Discussion Locked

Commands in /etc/rc.d/rc.local

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to launch fetchmail and vncserver during a reboot using commands in /etc/rc.d/rc.local, but they don't launch. The file attributes are 0777 and the owner is root. The same commands work fine from a shell but not during the bootup. Any ideas?

Brian

4 replies

by theohkm

I suggest the following possibilities:

[ ] The commands to lauch the fetchmail/vncserver are not inside the path environment when they run in rc.local. Try to use full path like "./something" , "/somewhere/something", etc.
[ ] Syntax error or shell scripts incompatible

by learn4ever

Firstly, if in fact the permissions are 0777, then the owner doesn't have any permissions ("0"), and the last "7" sets the sticky bit... not sure that's what you really want.

the leading 0 will obviously cause problems though.

by kieuminhvn

Hello !

You may try this :

First you check either you are in sudoers file or not if not add the line yourloginname ALL=NOPASSWD:ALL into your /etc/sudoers file

then add sudo before command to launch your fetchmail in your /etc/rc.d/rc.local

Mabe it will work

Good luck !

by chuckm

Use the full path ie. /usr/local/sbin/vncserver or whatever in the command. Logged in as root you can execute /etc/rc.d/rc.local and observe any error messages. If it works from the command prompt but not on startup, there is most likely an "exit 1" statement at the end of the previous command that runs during startup. In Slackware, you can examine the rc.M script to follow the sequence at bootup.

This discussion is closed to new replies.