[wplug] rc.local

Chris vze2f6h6 at verizon.net
Wed May 28 11:13:21 EDT 2003


> -----Original Message-----
> From: wplug-admin at wplug.org [mailto:wplug-admin at wplug.org] On Behalf Of
> billings at negate.org
> Sent: Wednesday, May 28, 2003 10:59 AM
> To: wplug at wplug.org
> Subject: RE: [wplug] rc.local
> 
> On Wed, 2003-05-28 at 10:40, Chris wrote:
> 
> >
> > Yep, it produces that plus this.
> >
> > -rwxr-xr-x      1 root    root            437 May 28 09:59 rc.d/rc.local
> 
> That means it's never run.  SysV-style init runs scripts in the
> /etc/rc#.d directories, where '#' is the runlevel.  For example, on my
> redhat 7.1 system:
> lrwxrwxrwx    1 root     root           17 Nov  5  2001
> /etc/rc0.d/K05anacron -> ../init.d/anacron*
> lrwxrwxrwx    1 root     root           17 Nov  5  2001
> /etc/rc1.d/K05anacron -> ../init.d/anacron*
> lrwxrwxrwx    1 root     root           17 Nov  5  2001
> /etc/rc2.d/S95anacron -> ../init.d/anacron*
> lrwxrwxrwx    1 root     root           17 Nov  5  2001
> /etc/rc3.d/S95anacron -> ../init.d/anacron*
> lrwxrwxrwx    1 root     root           17 Nov  5  2001
> /etc/rc4.d/S95anacron -> ../init.d/anacron*
> lrwxrwxrwx    1 root     root           17 Nov  5  2001
> /etc/rc5.d/S95anacron -> ../init.d/anacron*
> lrwxrwxrwx    1 root     root           17 Nov  5  2001
> /etc/rc6.d/K05anacron -> ../init.d/anacron*
> 
> the "K05" means that it's priority for being shut down (K) is 05, and
> the "S95" means that it's priority for being started is 95.  The
> priority is a zero-spaced number between 00 and 99.  Since your script
> has no such link in any of the runlevels, it is never run.

But rc.local does have links in rc[2-5].d just like what james was asking
about, but it is also located in rc.d which was not part of james's output.


> > This might be related to the same problem but when I reboot apache
> doesn't
> > restart either. There is a script in rc5.d called S85httpd that I am
> > assuming should start it but it doesn't
> 
> Are you running at runlevel 5?  If not, then you might want to put a
> link in the appropriate runlevel.
> 
> Of course, redhat has a couple useful tools for handling this kind of
> behavior.  'chkconfig' is the one I use most commonly.  The init scripts
> have to have chkconfig support, but it makes it very easy to add and
> remove the services.  Simply:
> 
> chkconfig --add <servicename, like httpd>
> 
> or, if you want to be very specific:
> 
> chkconfig --level <levels, like 345> <servicename> <on|off|reset>
> 
> Of course, I suggest reading the man page.

This machine does boot to run level 5 (GUI login).  I will try the
chkconfig.

Thanks,

Chris Romano




More information about the wplug mailing list