3 # Clean up any such stale file.
4 rm -f /tmp
/samba-was-not-running
6 # The smbd pid file is missing, or points to a dead process
7 if [ ! -f /var
/run
/samba
/smbd.pid
] || \
8 ! ps h
`cat /var/run/samba/smbd.pid` > /dev
/null
10 # The nmbd pid file is missing, or points to a dead process
11 if [ -f /var
/run
/samba
/nmbd.pid
] || \
12 ! ps h
`cat /var/run/samba/nmbd.pid` > /dev
/null
14 # let the postinst know not to start samba.
15 [ "$1" = "upgrade" ] && touch /tmp
/samba-was-not-running
19 # We read /etc/default/samba to know if we're running from inetd or as
20 # daemons so we don't call the init script if we are running from inetd.
21 [ -r /etc
/default
/samba
] && .
/etc
/default
/samba
23 # We call the init script to stop Samba only if we are running as daemons.
24 [ -x /etc
/init.d
/samba
-a "$RUN_MODE" != "inetd" ] && /etc
/init.d
/samba stop