Run arbitrary commands at boot time?
Rocco Stanzione
grasshopper at linuxkungfu.org
Fri Mar 10 13:37:34 GMT 2006
On Friday 10 March 2006 06:19, John Nilsson wrote:
> > You could just make a file in /etc/rc2.d/ (or whatever your runlevel
> > is, default is 2 IIRC), call it S99local, chmod +x the file, and add
> > your commands to there? That's what I do... Works For Me(tm).
>
> If I may comment.
>
> >From a usability point of view it would be better if that 'S99local'
>
> file already existed. (Or any other mechanism for that matter)
>
> It should be easy to discover, both for a someone looking for it, but
> also for someone just studying the boot system.
I agree with John here. Of course there are ways to accomplish this, and this
is one of them, and it's not too bad. It also helps demonstrate my point by
illustrating that there's not an ideal, designed-in way to do it. If we had
such a thing, documentation that now advises users to hack up various init
scripts could instead point to this single file, which would be common across
Ubuntu machines. Supporting startup problems would be made slightly easier
by giving us a good, single place to look for modifications to the startup
routine. Instructions on how to run a command at startup would be reduced to
a single sentence.
I mentioned before that the advice currently handed out on irc is to
modify /etc/init.d/bootmisc.sh. This works for most purposes, but it's far
from ideal and I can't think of a good reason not to give users an ideal way
to do it.
Thanks,
Rocco Stanzione
More information about the ubuntu-devel
mailing list