commit 21f26c1e6b72808a10c21925e75d8076ac3b6498
Author: Jan Palus <[email protected]>
Date:   Wed Jan 6 13:14:26 2021 +0100

    add git-shell to /etc/shells

 git-core.spec | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/git-core.spec b/git-core.spec
index a6c7ac0..d0a7e04 100644
--- a/git-core.spec
+++ b/git-core.spec
@@ -646,6 +646,20 @@ ln -snf git-remote-http 
$RPM_BUILD_ROOT%{gitcoredir}/git-remote-ftps
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+if [ ! -f /etc/shells ]; then
+       echo "%{_bindir}/git-shell" >> /etc/shells
+else
+       grep -q '^%{_bindir}/git-shell$' /etc/shells || echo 
"%{_bindir}/git-shell" >> /etc/shells
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+       umask 022
+       grep -v '^%{_bindir}/git-shell$' /etc/shells > /etc/shells.new
+       mv -f /etc/shells.new /etc/shells
+fi
+
 %post daemon-inetd
 %service -q rc-inetd reload
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/git-core.git/commitdiff/21f26c1e6b72808a10c21925e75d8076ac3b6498

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to