rc.local doesn't get run?

Barius Drubeck barius.drubeck at gmail.com
Tue Feb 6 12:30:30 PST 2007

On Tuesday 06 February 2007 09:01, Bauke Jan Douma wrote:
> TheOldFellow wrote on 06-02-07 08:30:
> > Bauke Jan Douma wrote:
> >> Dan Nicholson wrote on 06-02-07 03:18:
> >>
> >> I always thought rc.local, if and when present, was indeed
> >> supposed to be run /last/ in the boot process -- see e.g.:
> >>
> >> http://www.freeos.com/articles/3243/
> >> http://www.netbsd.org/guide/en/chap-rc.html
> >
> > Freeos and netbsd ain't Linux!
> Well, early Linux (on which my system is based, it's no distro nor
> LFS) was based on BSD-type init scripts.
> Thanks for pointing out what Linux is not, but then tell me, what
> /is/ Linux.
> I stated: "if and when present" on purpose.
> Btw., here's another reference to rc.local:
> http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-guide/s

If you wanna know, Slackware also supports an rc.local.  Yet it's boot 
scripts are configured quite differently from any other distro I 
know.  So what?  In fact there are a number of commonalities but 
every system I have seen seems to use a different subset plus maybe a 
couple of unique ideas of their own.

It is true that a lot of commercial Linux distributions and some other 
unix flavours support running rc.local in the way you described.  It 
is also true as Dan said that some distros provide the same feature 
but call it something else.  And it is true as the old fella said 
that there is nothing magic about it, just programming.  Here's how 
Slackware does it for example (an extract from their rc.M script):

# Start the local setup procedure.
if [ -x /etc/rc.d/rc.local ]; then
  . /etc/rc.d/rc.local

The reason why distros support this feature is so that the local 
sysadmin is free to customize (in a limited way) the startup sequence 
without making any modifs to the scripts provided by the distro.  The 
distro scripts can then be freely upgraded to a new release without 
zapping the sysadmin's local edits because the distro doesn't touch 
the rc.local.

That's just a common convention, not a standard.  You're free to 
configure your LFS system how you like.  There are no fixed rules.  
Do what works best.  Read the man pages for init(8) and inittab(5) 
and read the bootscripts and the inittab.  When you understand that, 
you can judge for yourself what you think is best.

Dan's suggestion of creating the S99 symlink has the advantage of not 
requiring any modifs to the bootscripts so giving you the option to 
upgrade your LFS one day and keep your existing rc.local.  OTOH, 
you're free to hack your bootscripts as you like or add other scripts 
and symlinks to start your custom services or whatever you want 
without even having an rc.local at all.

> Redhat..., hm.  So again, praytell, what /is/ Linux.

Linux is a kernel.

Unless you prefer an answer from the horse's mouth:

"Linux is a clone of the operating system Unix, written from scratch 
by Linus Torvalds with assistance from a loosely-knit team of hackers 
across the Net."

Now praytell, what /is/ Unix?  ;-)


More information about the lfs-support mailing list