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
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@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 >
The file smb is for use in the sysvinit scheme. I would imagaine you start in either init mode 3 (console mode) or initi mode 5 (xdm). So cd in /etc/init/rc3.d and /etc/init/rc5.d and make the following links... [hieb@lnxwp1 scripts]$ ls -la /etc/rc.d/rc3.d/*smb* lrwxrwxrwx 1 root root 13 Sep 1 13:51 /etc/rc.d/rc3.d/S99smb -> ../init.d/smb [hieb@lnxwp1 scripts]$ ls -la /etc/rc.d/rc5.d/*smb* lrwxrwxrwx 1 root root 13 Sep 1 13:51 /etc/rc.d/rc5.d/S99smb -> ../init.d/smb Note the 'S' means start, the 99 means the order the service will be started relative to the other servies in this init mode. I typically add new services at a higher number than existing services so as to not introduce missing dependencies at boot time. You can also put the service shutdown in init mode 6 (shutdown) [hieb@lnxwp1 scripts]$ ls -la /etc/rc.d/rc6.d/*smb* lrwxrwxrwx 1 root root 13 Sep 1 13:52 /etc/rc.d/rc6.d/K001smb -> ../init.d/smb Here the 'K' is for kill, the number 001 again specifies the order the servise will be shutdown relative to other services. Again I typically shutdown new services before I shutdown existing services so as to not introduce missing dependencies at shutdown. HTH, Michael Date: Sat, 2 Oct 1999 20:46:59 +0800 From: Zhou Senqiang <zhousenq@comp.nus.edu.sg <mailto:zhousenq@comp.nus.edu.sg> > To: samba@samba.org <mailto:samba@samba.org> Subject: How to start smb server when reboot? Message-ID: <99100220523102.00237@cf-dblab4 <mailto:99100220523102.00237@cf-dblab4> > Content-Type: text/plain MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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": [deleted...]