Results 1 to 6 of 6
I have a few commands that I want to be run on boot up. Login would be OK, but the thing is it needs to be run as root. Is ...
- 06-11-2008 #1
Startup tasks (on boot, not login)
I have a few commands that I want to be run on boot up. Login would be OK, but the thing is it needs to be run as root. Is there a folder or something that I can just drop the script in that will do this? And should I be worried about the order? If at all possible I think it should be near the end.
When I find myself burried in errors, Windows Help appears to me; speaking words of wisdom, Reboot!
- 06-11-2008 #2
you can drop them in the file /etc/rc.d/rc.local . in that case they will be run after all initialization is done.
Linux and me it's a love story
- 06-12-2008 #3Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Bear in mind that this is not true in all cases. What you describe will be valid only for System V compatible init systems. Some distros use that, but some others use a BSD based system. Some others use something else, like Gentoo (it's probably the most flexible init system I've ever found).
So, if rc.d/rc.local doesn't work, you should try reading the documentation for your distro. Or at least, let us know which distro are you using, so eventually someone familiar with that distro will answer more accurately.
- 06-12-2008 #4
- 06-12-2008 #5Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Well, it's just like some kind of common acknowledgment. Most surely, your advice was valid, because the SysV init system could be considered kind of like the standard in linux. Most linux distros use a SysV compatible scheme.
I just pointed that out in case s/he is using any of "the other distros" that don't do it that way. In any case, there can be always distro specific issues, so, checking the distro documentation (something that people rarely do at all) would never hurt anyway.
- 06-12-2008 #6
I'm using Ubuntu 8.04. I never would have guessed that things like this would vary between distros, but hey, I'm not that knowledgeable about the core or I probably wouldn't be asking questions like these!

OK thanks, from what I see that should work, but if it doesn't, of course I'll be back here soon!
When I find myself burried in errors, Windows Help appears to me; speaking words of wisdom, Reboot!


Reply With Quote
