Boot.local wont launch sh
opensuse 11.1
So i've edited my boot.local file to launch an sh script on startup so it temporarily mounts my other drives for the session. Though when i logged off and logged back in to test it, nothing worked. I had to do it all manually. Have I done something wrong, or missing something? Also does anyone know if it is possible to run kicker through cli? without having to F2 and type kicker for it to launch, I want the kicker to launch on start up as well but not sure how to do this. Please help. Code:
#! /bin/sh |
I recently ran into a similar problem.
Moving my script to the /opt directory and making sure it was executable solved my problem. |
Well i would try it, but now the script isnt even working for some reason. When i try to execute it from terminal i get the following
Code:
$LogFile indicates unclean shutdown (0, 0) |
Quote:
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 |
All times are GMT -5. The time now is 01:16 PM. |