From: Jan Palus Date: Wed, 6 Jan 2021 12:14:26 +0000 (+0100) Subject: add git-shell to /etc/shells X-Git-Tag: auto/th/git-core-2.30.1-1~4 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fgit-core.git;a=commitdiff_plain;h=21f26c1 add git-shell to /etc/shells --- 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