Go Back   PCMech Forums > Linux Support > Linux OS and Software Assistance

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 10-09-2000, 12:42 AM   #1
Member (6 bit)
 
Join Date: Apr 2000
Location: Oak Park, MI
Posts: 33
Question

I just installed Samba on my SPARC-20 running Solaris 8. I am trying to write a script to start nmbd and smbd during bootup. This is my first attempt at writing a shell script. This is my file /etc/init.d/startsmb.
#!/sbin/sh
echo "Starting Samba...."
/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D
echo "done"

Here are the permissions.
# ls -al startsmb
-rwxr--r-- 1 root sys 210 Oct 8 02:21 startsmb
According to the "file" command it is an executable script.
# file startsmb
startsmb: executable /sbin/sh script

I cannot get this script to work and must start the daemons manually. Is there something that I am missing?
TDub is offline   Reply With Quote
Old 10-10-2000, 10:14 AM   #2
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
Where are you calling the script from?
Make the file /etc/rc.d/startsmb with the same contents as you have.
Then call it from within /etc/rc.d/rc.local

What I'd do is make the file startsmb in /etc/rc.d/startsmb without the #!/sbin/sh [it isnt needed]

edit /etc/rc.d/rc.local
and add bash /etc/rc.d/startsmb to the end.

PS: why not use your favourite runlevel editor to start samba?
Statica is offline   Reply With Quote
Old 10-11-2000, 12:29 AM   #3
Member (6 bit)
 
Join Date: Apr 2000
Location: Oak Park, MI
Posts: 33
Wink

Thanks Static! That was the missing piece. I moved my Samba script to /etc/init.d, created a link to /etc/rc2.d, rebooted and the daemons now start on bootup!
TDub is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:09 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0