Properly display popt errors. Also fix debug to be -d for consistency with other...
[Samba.git] / packaging / SGI / samba.rc
blobbc0f90ee77fefaab94f03e37805c44e3087a682e
1 #! /bin/sh
4 # Samba server control
7 IS_ON=/etc/chkconfig
8 KILLALL=/sbin/killall
10 SAMBAD=/usr/samba/bin/smbd
11 #SAMBA_OPTS=-d2
12 NMBD=/usr/samba/bin/nmbd
13 #NMBD_OPTS=-d1
15 if test ! -x $IS_ON ; then
16 IS_ON=true
19 if $IS_ON verbose ; then
20 ECHO=echo
21 else # For a quiet startup and shutdown
22 ECHO=:
25 case $1 in
26 'start')
27 if $IS_ON samba && test -x $SAMBAD; then
28 $KILLALL -15 smbd nmbd
29 $ECHO "Samba:\c"
30 $SAMBAD $SAMBA_OPTS -D; $ECHO " smbd\c"
31 $NMBD $NMBD_OPTS -D; $ECHO " nmbd\c"
32 $ECHO "."
35 'stop')
36 $ECHO "Stopping Samba Servers."
37 $KILLALL -15 smbd nmbd
38 exit 0
41 echo "usage: /etc/init.d/samba {start|stop}"
43 esac