diff options
author | John Terpstra <jht@samba.org> | 2000-07-30 06:33:30 +0000 |
---|---|---|
committer | John Terpstra <jht@samba.org> | 2000-07-30 06:33:30 +0000 |
commit | 5dbd30002acaa971a84b6d917f9dc06d7f118836 (patch) | |
tree | 8feb2792e52b7f11cd0c3f3751d696810ae87b01 /packaging/Caldera/OpenLinux/samba.init | |
parent | b58ebd10dee6e779fb4b977a7f55db1b23001564 (diff) | |
download | samba-5dbd30002acaa971a84b6d917f9dc06d7f118836.tar.gz samba-5dbd30002acaa971a84b6d917f9dc06d7f118836.tar.bz2 samba-5dbd30002acaa971a84b6d917f9dc06d7f118836.zip |
Adding files provided by Klaus Singvogel of Caldera
(This used to be commit ab6d01bdccf3106c00563173bfb3e3b3d7c3a64c)
Diffstat (limited to 'packaging/Caldera/OpenLinux/samba.init')
-rwxr-xr-x | packaging/Caldera/OpenLinux/samba.init | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/packaging/Caldera/OpenLinux/samba.init b/packaging/Caldera/OpenLinux/samba.init new file mode 100755 index 0000000000..1b830a1da3 --- /dev/null +++ b/packaging/Caldera/OpenLinux/samba.init @@ -0,0 +1,62 @@ +#!/bin/sh +# +# description: Starts and stops the Samba smbd and nmbd daemons +# used to provide SMB network services. + +NAME_S=smbd +DAEMON_S=/usr/sbin/$NAME_S +NAME_N=nmbd +DAEMON_N=/usr/sbin/$NAME_N + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# See how we were called. +case "$1" in + start) + [ -e $SVIlock ] && exit 1 + [ ${NETWORKING} = "no" ] && exit 2 + [ -x $DAEMON_S -a -x $DAEMON_N ] || exit 2 + + #[ "$CONFIGURED" != "no" -a "$CONFIGURED" != "false" ] || { + SVIemptyConfig /etc/samba.d/smb.conf && { + echo "$DESCRIPTIVE: not configured! Skipped..." + exit 2 + } + + echo -n "Starting $IDENT: " + ssd -S -n $NAME_S -x $DAEMON_S -- $OPTIONS_SMB + ssd -S -n $NAME_N -x $DAEMON_N -- $OPTIONS_NMB + + echo "." + touch $SVIlock + ;; + + stop) + [ -e $SVIlock ] || exit 0 + + echo -n "Stopping $IDENT: " + ssd -K -p /var/lock/samba.d/$NAME_N.pid -n $NAME_N #-x $DAEMON_N + ssd -K -p /var/lock/samba.d/$NAME_S.pid -n $NAME_S #-x $DAEMON_S + + echo "." + rm -f $SVIlock + ;; + + restart) + echo -n "Restarting $IDENT: " + $0 stop + $0 start + exit $? + ;; + + *) + echo "Usage: $SVIscript {start|restart|stop}" + exit 1 + ;; +esac + +exit 0 |