LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Some rc.d Scripts Not Starting (https://www.linuxquestions.org/questions/linux-software-2/some-rc-d-scripts-not-starting-159048/)

granatica 03-17-2004 02:01 PM

Some rc.d Scripts Not Starting
 
Hello,

I am running Slackware 9.1. I have some scripts in /etc/rc.d, namely rc.sendmail, rc.httpd and rc.samba, that refuse to start at boot. They are executable. They work when run from the command line as root, ie: /etc/rc.d/rc.sendmail start. They are specified in rc.M. Other files in rc.M, like rc.mimedefang, rc.bind, etc., start at boot just fine. I've also put the the troublesome scripts in rc.local, like:

/etc/rc.d/rc.sendmail start
/etc/rc.d/rc.httpd start
/etc/rc.d/rc.samba start

No luck. I also tried:

/usr/sbin/apachectl startssl

in rc.local and that doesn't work either. They ALL work from the command line. Right now I have a cron job that kills and starts them every so often to make sure they are up. That works, but I want to know how to fix the startup scripts. Any help?

Thanks,

Jason

arnold 03-17-2004 02:36 PM

slackware looks different, but in other *nixs*, there are typically directories of the form
rcN.d, where N is run levels 0-6, e.g.:
cd /etc/rc.d
ls -CF */*sendm*
init.d/sendmail* rc1.d/K30sendmail@ rc3.d/S80sendmail@ rc5.d/S80sendmail@
rc0.d/K30sendmail@ rc2.d/S80sendmail@ rc4.d/S80sendmail@ rc6.d/K30sendmail@

The rcN.d contain symlinks to init.d/sendmai which are executed when entering that runlevel.

try chkconfig

granatica 03-17-2004 03:12 PM

Yes, Slackware is quite different. No init.d directory. As a sidenote, after initial installation all 3 services started fine from /etc/rc.d/rc.M script. I'm not sure what happened along the way. I did install MIMEDefang and it runs just fine from rc.M, but somewhere along the line the others quit. And it looks like rc.local doesn't do anything anymore. I tried running any command in there and it never executes on boot...

Looking_Lost 03-17-2004 05:00 PM

One thing I've noticed, in particular after installing mysql and apache myself from source some services fall to start when run from rc.M as well as rc.local being ignored, solution I found was to remove the "." dot at the start of the command to start the daemon in rc.M i.e if it's

. /etc/rc.d/rc.mysql start

removed the dot to make it

/etc/rc.d/rc.mysql start

don't know if it's a timing issue or the daemon is blocking the rest of the script from being run but doing that solved it for me. Trial and error and the use of echo "Now starting whatever daemon" can help you pinpoint which particular one is acting up.

granatica 03-17-2004 05:07 PM

I think you may be on to something there. I haven't tried your suggestion yet, but I just got done doing some brainstorming and testing. The problem started after I added MIMEDefang to rc.M. I removed it and things starting runnin as normal, all init scripts running at boot. I added MIMEDefang to rc.sendmail and everything seems to run better now.

It could very well have been the "." , though this way is probably better for me since it starts and stops all mail related services in one command.

Thanks!!


All times are GMT -5. The time now is 07:16 AM.