I'm running 12.04, and I've never really messed with
rc.local. First, when I source
rc.local, should it be
sh /path/to/myscript.h or does it even matter? Can it be
bash -c "/path/to/myscript.sh"?
Second, it is my understanding that during startup, my script will be called with
myscript.sh start and during shutdown
myscript.sh stop. Is that correct?
myscript.sh has an infinite loop, will it hang the startup of the machine? (It isn't truly an infinite loop because
myscript.sh stop will stop it gracefully) When I run the script from terminal, I use the command
myscript.sh start &. Can
rc.local do the same or similar?
Right now I have a shell script that accomplishes the same goal but has a true infinite loop and is sourced from
.gnomerc. I'm trying to make it a little less "hacky". Thanks.