/etc/rc.local doesn't run at boot
Larry Alkoff
labradley at mindspring.com
Tue Mar 2 18:55:58 UTC 2010
Nils Kassube wrote:
> Larry Alkoff wrote:
>> When I boot the machine, /etc/rc.local doesn't run.
>>
>> root at arriba /etc/init.d# ls -l /etc/rc.local
>> -rwxr-xr-x 1 root root 3.2K 2010-02-14 18:31 /etc/rc.local
>>
>> root at arriba /etc/init.d# ls -l /etc/init.d/rc.local
>> -rwxr-xr-x 1 root root 522 2009-01-23 09:01 /etc/init.d/rc.local
>>
>> init.d/rc.local looks like this:
>
> This file looks like the original /etc/init.d/rc.local. Do you know if
> /etc/init.d/rc.local is run at boot? And if yes, how do you know that
> /etc/rc.local isn't started? What is the contents of that script? Maybe
> it stops too early before your own code is run?
>
>
> Nils
>
I have finally found out why rc.local doesn't seem to run.
First, /etc/rc.local starts with
#!/bin/sh -e
not complete if there is an error.
Second I have a line allows a swap of the caps-lock and control key by
/bin/loadkeys --clearstrings /etc/keymap.normal
# or /bin/loadkeys --clearstrings /etc/keymap.swap
depending on whether swap is needed or not.
This generates an error so rc.local appears not to run.
This error is created no matter which version of keymap is run,
indicating that keymap is corrupt. It may well have gotten corrupted
by apt-get update or apt-get dist-upgrade or possibly one of the changes
in Kubuntu version 8.04 -> 8.04.1 -> 8.04.2 -> 8.04.3 -> 8.04.4 doesn't
work the same now.
I've started to work on a new method for swapping the keys ala
/usr/bin/setxkbmap -option ctrl:swapcaps
or nothing.
This appears to not generate an error if I simply run /etc/rc.local
but I'll know better next time I have to reboot.
More later.
Larry
More information about the ubuntu-users
mailing list