General discussion

Locked

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

By brian ·
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

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by theohkm In reply to Commands in /etc/rc.d/rc. ...

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

Collapse -

by learn4ever In reply to Commands in /etc/rc.d/rc. ...

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.

Collapse -

by kieuminhvn In reply to Commands in /etc/rc.d/rc. ...

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 !

Collapse -

by chuckm In reply to Commands in /etc/rc.d/rc. ...

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.

Back to Linux Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums