Quote:
Originally Posted by BruceCadieux
I recently ran into a similar problem.
Moving my script to the /opt directory and making sure it was executable solved my problem.
|
A couple of observations:
First, since you were explicitly passing the name of the script to "sh" it really didn't
need to be made executable itself.
Second, the comment at the bottom of the boot.local file indicates that that script is run
before the system has even entered run level "1". I believe the only filesystem you can count on being available at that time is the root filesystem. If /opt was
not a separate filesystem but rather part of the root filesystem, it would explain why your script worked when you put it in /opt instead of /home. (I'd bet that the boot process displayed a "file not found" error when the script was sitting under /home.)
Another option would have been to leave the low-level boot script alone (it'll almost certainly get overwritten when you upgrade) and write a script, say "do_local_stuff", that you keep in /etc/init.d/ (or even better, if /usr/local is a separate filesystem, in /usr/local/etc/init.d/ to keep it safe during upgrades or reinstalls) and link to it in the rc3.d directory: "ln -s /etc/init.d/do_local_stuff S99do_local_stuff". The "S99" prefix should cause it to run last (or darned near) in the initialization process. That way you can rely on everything in the system being available for your script to use.
Finally, wouldn't the mounting that you're doing be done more easily by just adding the appropriate lines to /etc/fstab? Doing the mounts as part of some other script that's going to get run
anyway during the boot process is going to always mount the drives just like they would via /etc/fstab. Just a thought...
Anyway, hope some of this helps.
--
Rick