|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (6 bit)
Join Date: Apr 2000
Location: Oak Park, MI
Posts: 33
|
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? |
|
|
|
|
|
#2 |
|
Premium Member
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? |
|
|
|
|
|
#3 |
|
Member (6 bit)
Join Date: Apr 2000
Location: Oak Park, MI
Posts: 33
|
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!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|