Hey,
you can add commands to startup by creating/editing this shell script:
/mnt/OSD/rc.user
I've used it for many years now, it's great for having your OSD auto-mount network shares on startup. The only thing I found was needing to delay these commands by about 5 seconds (i.e. stick in a "sleep 5;") or else they didn't succeed - I think networking wasn't fully up when rc.user is called.
OSD has the usual rc scripts for startup, explore /etc/init.d and /etc/rcX.d. There are no shutdown scripts tho, if I remember correctly.
-G
I finally got around to messing with this today, and it works. I set up that script to mount my network shares and to do a time sync. I have a few comments and questions (feel free to enjoy the comments, but be sure to answer the questions...):
1) The mounting of network shares via the rc.user file does work. At least, I can say that they come up in green in the interface - and seem to all the world to be mounted. The acid test, of course, is to see if my overnight recording works. I have a vague memory of having tried this in the past, and having it look OK during the day, but the overnight recording still bombed (until I went in an manually clicked on them). I will report back tomorrow on this.
2) What is the recovery if I screw this up? I.e., what if I put something in there that hangs the boot? This has hasn't happened yet (knock wood), but everytime you change the file and reboot, your heart skips a beat hoping that it will come back up. Now I that I think about it, I think you should still be able to telnet at this point and fix it. Is that right?
2a) Note that a "Emergency Firmware Upgrade" wouldn't help, because the nice thing about the EFU is that it *doesn't* reset your settings. That is, as far as I can tell, it doesn't reset the contents of /mnt/OSD.
3) When exactly in the boot process does this script run? I think it is when the phrase "The power of freedom - Neuros" is onscreen. Is that right? I think I detect a (much) longer than normal pause at this point now. Note that this is the second "The power of freedom" message - the first one doesn't mention "Neuros".
4) It worked fine the first time for mounting shares, but the time sync didn't work. I figured out that the problem was that the OSD must be reading the time from the onboard clock *after* running the rc.user script (can you confirm this?). I.e., my time sync *was* working, but it was getting overwritten by a later process. Note that the battery on my OSD is shot; on every boot, my time gets reset to 1/1/70@12:00 AM. I changed the line in the rc file that does the time sync to something like:
(sleep 30;...) &
to "fork off" that process and do it 30 seconds later. That seems to be working (yey!)
5) Note, just FYI, that the first line of my rc.user script is: exec > /tmp/rcuser.out 2>&1
This seems like a good idea for everyone. There isn't any other way to see the output of the script, is there?