From ab9c2394194f2a81c0d990d3970e3a06940d4906 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 16 Jan 2004 17:46:38 +0000 Subject: BUG 891 & 949: Fedora Packaging Fixes (This used to be commit a7d0aec2b7ef132b5c631cb26d0a93dd66d0fff3) --- packaging/Fedora/samba.spec.tmpl | 7 +++++++ packaging/Fedora/smb.init | 8 +++++--- packaging/Fedora/winbind.init | 6 ++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/packaging/Fedora/samba.spec.tmpl b/packaging/Fedora/samba.spec.tmpl index ec50cc705b..90abadce58 100644 --- a/packaging/Fedora/samba.spec.tmpl +++ b/packaging/Fedora/samba.spec.tmpl @@ -214,6 +214,13 @@ if [ "$1" -ge "1" ]; then %{initdir}/smb condrestart >/dev/null 2>&1 fi + +%post swat +# Add swat entry to /etc/services if not already there. +if [ ! "`grep ^\s**swat /etc/services`" ]; then + echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services +fi + %post common /sbin/chkconfig --add winbind /sbin/ldconfig diff --git a/packaging/Fedora/smb.init b/packaging/Fedora/smb.init index fca823a064..4182c13408 100644 --- a/packaging/Fedora/smb.init +++ b/packaging/Fedora/smb.init @@ -60,14 +60,16 @@ start() { stop() { KIND="SMB" echo -n $"Shutting down $KIND services: " - killproc smbd + killproc smbd -TERM RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f /var/run/smbd.pid echo KIND="NMB" echo -n $"Shutting down $KIND services: " - killproc nmbd + killproc nmbd -TERM RETVAL2=$? - [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb + [ $RETVAL -eq 0 ] && rm -f /var/run/nmbd.pid + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb echo "" return $RETVAL } diff --git a/packaging/Fedora/winbind.init b/packaging/Fedora/winbind.init index ced81135b2..05e0eb4d00 100644 --- a/packaging/Fedora/winbind.init +++ b/packaging/Fedora/winbind.init @@ -49,9 +49,11 @@ stop() { echo KIND="Winbind" echo -n $"Shutting down $KIND services: " - killproc winbindd + killproc winbindd -TERM RETVAL=$? - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbindd + [ $RETVAL -eq 0 ] \ + && && rm -f /var/run/nmbd.pid \ + && rm -f /var/lock/subsys/winbindd echo "" return $RETVAL } -- cgit