]> git.pld-linux.org Git - packages/git-core.git/commitdiff
add git-shell to /etc/shells
authorJan Palus <atler@pld-linux.org>
Wed, 6 Jan 2021 12:14:26 +0000 (13:14 +0100)
committerJan Palus <atler@pld-linux.org>
Wed, 6 Jan 2021 12:14:26 +0000 (13:14 +0100)
git-core.spec

index a6c7ac0c40e081ec5da2d54f84be51a8b8457378..d0a7e048fd317e7e185bc51d33dfc443c0e5850c 100644 (file)
@@ -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
 
This page took 0.17772 seconds and 4 git commands to generate.