/etc/rc.local does not run at boot

Larry Alkoff labradley at mindspring.com
Sun Feb 14 20:27:10 UTC 2010


Tom H wrote:
>> How can I force /etc/init.d to run /etc/rc.local when my 8.04 LTS
>> machine boots?
> 
>> The only way /etc/rc.local runs is if I _manually_ run it as root with
>> /etc/rc.local.
> 
>> I think it may be something in /etc/init.d/rc.local which is unchanged
>> from the installation of 8.04 LTS.
> 
>> ls -l /etc/init.d/rc.local
>> -rwxr-xr-x 1 root root 522 2009-01-23 09:01 /etc/init.d/rc.local
> 
>> do_start() {
>>         if [ -x /etc/rc.local ]; then
>>                 log_begin_msg "Running local boot scripts (/etc/rc.local)"
>>                 /etc/rc.local
>>                 log_end_msg $?
>>         fi
>> }
> 
> The only check that /etc/init.d/rc.local makes is whether
> /etc/rc.local is executable.
> 
> Since you can run it after boot, it must be.
> 
> Do you have symbolic links to /etc/init.d/rc.local in /etc/rcX.d?
> 

These are the symbolic links that run rc.local:

root at arriba /etc# grep -r  rc.local rc*.d
rc2.d/S99rc.local:      if [ -x /etc/rc.local ]; then
rc2.d/S99rc.local:              log_begin_msg "Running local boot 
scripts (/etc/rc.local)"
rc2.d/S99rc.local:              /etc/rc.local
rc3.d/S99rc.local:      if [ -x /etc/rc.local ]; then
rc3.d/S99rc.local:              log_begin_msg "Running local boot 
scripts (/etc/rc.local)"
rc3.d/S99rc.local:              /etc/rc.local
rc4.d/S99rc.local:      if [ -x /etc/rc.local ]; then
rc4.d/S99rc.local:              log_begin_msg "Running local boot 
scripts (/etc/rc.local)"
rc4.d/S99rc.local:              /etc/rc.local
rc5.d/S99rc.local:      if [ -x /etc/rc.local ]; then
rc5.d/S99rc.local:              log_begin_msg "Running local boot 
scripts (/etc/rc.local)"
rc5.d/S99rc.local:              /etc/rc.local


> What is the output of
> find /etc -name *rc\.local -print0 ¦ xargs -0 ls -l
> 
root at arriba /# find /etc -name *rc\.local -print0 ¦ xargs -0 ls -l
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]

I don't know much about using find but your syntax didn't work.





More information about the kubuntu-users mailing list