]> git.pld-linux.org Git - packages/dip.git/commitdiff
- add %preun and %post that add/remove entry /usr/sbin/diplogin from /etc/shells
authorMarcin Krzyżanowski <marcin.krzyzanowski@hakore.com>
Fri, 9 Aug 2002 11:24:58 +0000 (11:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- adapterized.
- release 16

Changed files:
    dip.spec -> 1.14

dip.spec

index 816eb93c2acd5b084e7ef9a8223f568302d6ec5e..3dfa3a3a08c01a0a4bbaa5051cbcc645c17d7e6a 100644 (file)
--- a/dip.spec
+++ b/dip.spec
@@ -2,7 +2,7 @@ Summary:        Handles the connections needed for dialup IP links
 Summary(pl):   Obs³uga po³±czeñ wdzwanianych
 Name:          dip
 Version:       3.3.7o
-Release:       15
+Release:       16
 License:       GPL
 Group:         Applications/Communications
 Source0:       ftp://sunsite.unc.edu/pub/Linux/system/network/serial/%{name}337o-uri.tgz
@@ -65,7 +65,7 @@ potzrbuje si
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_prefix}/sbin,%{_mandir}/man8}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8}
 
 install -c dip $RPM_BUILD_ROOT%{_sbindir}
 ln -sf dip $RPM_BUILD_ROOT%{_sbindir}/diplogin
@@ -76,6 +76,23 @@ echo ".so dip.8" > $RPM_BUILD_ROOT%{_mandir}/man8/diplogin.8
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+
+%post
+if [ ! -f /etc/shells ]; then
+       echo "/usr/sbin/diplogin" > /etc/shells
+else
+       if ! grep -q '^/usr/sbin/diplogin$' /etc/shells; then
+               echo "/usr/sbin/diplogin" >> /etc/shells
+       fi
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+       grep -v /usr/sbin/diplogin /etc/shells > /etc/shells.new
+       mv -f /etc/shells.new /etc/shells
+fi
+
+
 %files
 %defattr(644,root,root,755)
 %attr(0755,root,uucp) %{_sbindir}/dip
This page took 0.138504 seconds and 4 git commands to generate.