Since you say that
rc.local executes properly when you run it manually, the two things that immediately come to mind are:
- Something is going wrong at boot time but works when you run it yourself. Perhaps you're trying to run a program that's not in the PATH at boot time.
/etc/rc.local really isn't being run at boot.
In both cases, the first thing I'd do is put something like
/usr/bin/printenv > /var/tmp/rc.local-$(date +%T)
as the very first line of
rc.local after the
#!/bin/sh line. That'll print the environment variables to a timestamped file every it is run. (Don't write the file to
/tmp because that's emptied at boot.) Run
/etc/rc.local manually and take a quick look at the resulting file (it'll be named something like
/var/tmp/rc.local-21:14:35). Then reboot your system.
You should have two files in
/var/tmp (or wherever) that you can compare. If you only the first file,
/etc/rc.local isn't really getting called. If you have two files, compare them. The later one will have a very sparse environment and PATH. Look through your
rc.local script and see if there's anything you're trying to run that depends on some variable or some component of PATH that's not in the boot-time environment. If you find something, add the necessary initialization to