lib: strings: Simplify strcasecmp
[Samba.git] / packaging / SGI / samba.rc
blob23a9a30d6f44d0a90ffba7e4604b1c45ef6500df
1 #! /bin/sh
4 # Samba server control
7 IS_ON=/etc/chkconfig
8 KILLALL=/sbin/killall
10 SAMBAD=/usr/samba/bin/smbd
11 PROFILE_SAMBAD=/usr/samba/bin/smbd.profile
12 #SAMBA_OPTS=-d2
13 NMBD=/usr/samba/bin/nmbd
14 PROFILE_NMBD=/usr/samba/bin/nmbd.profile
15 #NMBD_OPTS=-d1
17 SMBCONTROL=/usr/samba/bin/smbcontrol
19 if test ! -x $IS_ON ; then
20 IS_ON=true
23 if $IS_ON verbose ; then
24 ECHO=echo
25 else # For a quiet startup and shutdown
26 ECHO=:
29 if $IS_ON sambaprofiling ; then
30 enable_profiling=yes
33 if test "$enable_profiling" -o "$1" = "profile" ; then
34 SAMBAD=$PROFILE_SAMBAD
35 NMBD=$PROFILE_NMBD
36 enable_profiling="yes"
39 case $1 in
40 start|profile)
41 if $IS_ON samba && test -x $SAMBAD; then
42 /etc/init.d/samba stop
43 $ECHO "Samba:\c"
44 $SAMBAD $SAMBA_OPTS -D; $ECHO " smbd\c"
45 $NMBD $NMBD_OPTS -D; $ECHO " nmbd\c"
46 $ECHO "."
48 if $IS_ON samba && test "$enable_profiling" ; then
49 if test -x $SMBCONTROL; then
50 $ECHO "Enabling Samba profiling."
51 $SMBCONTROL smbd profile on > /dev/null 2>&1
52 $SMBCONTROL nmbd profile on > /dev/null 2>&1
54 $KILLALL -HUP pmcd
57 stop)
58 $ECHO "Stopping Samba Servers."
59 $KILLALL -15 smbd nmbd
60 $KILLALL -15 smbd.profile nmbd.profile
61 $KILLALL -15 pmdasamba
62 exit 0
65 echo "usage: /etc/init.d/samba {start|stop|profile}"
67 esac