How to start smb server when reboot?

Darrin M. Gorski Darrin at Gorski.net
Sun Oct 3 14:10:03 GMT 1999


Looks like a SuSE Linux install.

Have you checked that $START_SMB is set to "yes" in /etc/rc.config?

					[Darrin]
--
Darrin M. Gorski <Darrin at Gorski.net>

On Sat, 2 Oct 1999, Zhou Senqiang wrote:

> Hi,
>    I installed Samba 2.0.3 on Linux 2.2.5.  Every time I reboot system I found
> the smb has not been started. But in the directory /etc/rc.d,  the file "smb"
> exists.  When I run "smb restart",after a while, the samba server is ok. I
> wonder why the samba server is not up when system reboot. Thanks a lot.
> Followed is the content of the file "smb":
> 
> #! /bin/sh
> . /etc/rc.config
> 
> # Determine the base and follow a runlevel link name.
> base=${0##*/}
> link=${base#*[SK][0-9][0-9]}
> 
> # Force execution if not called by a runlevel directory.
> test $link = $base && START_SMB=yes
> test "$START_SMB" = "yes" || exit 0    
> # The echo return value for success (defined in /etc/rc.config).
> return=$rc_done
> case "$1" in
>     start)
>         echo -n "Starting SMB services:"
>         startproc /usr/sbin/nmbd -D || return=$rc_failed
>         startproc /usr/sbin/smbd -D || return=$rc_failed
>         echo -e "$return"
>         ;;
>     stop)
>         echo -n "Shutting down SMB services:"
>         killproc -TERM /usr/sbin/nmbd || return=$rc_failed
>         killproc -TERM /usr/sbin/smbd || return=$rc_failed
>         echo -e "$return"
>         ;;
>     restart|reload)
>         $0 stop  &&  $0 start  ||  return=$rc_failed
>         ;;
>     status)                
>   checkproc /usr/sbin/nmbd && echo -n "OK " || echo -n "No process "
>         checkproc /usr/sbin/smbd && echo "OK " || echo "No process"
>         ;;
>     *)
>         echo "Usage: $0 {start|stop|restart|reload|status}"
>         exit 1
> esac
> 
> # Inform the caller not only verbosely and set an exit status.
> test "$return" = "$rc_done" || exit 1
> exit 0                            
> 





More information about the samba mailing list