I needed to do basically rc.local on my QNAP NAS server, since it setups various things at bootup time. Changes to these setups would therefore not persist a reboot. Via QNAP support, I got a link to a page showing how to setup an autorun.sh script as part of the bootup process. This was all splendid, except I couldn't find my device in the list. So, I found this command to probe the system which boot drive I'm on, and from thereon it was easy to find which partition to mount. What I ran was basically this:
[admin@Freya /]# /sbin/hal_app --get_boot_pd port_id=0 /dev/sdg [admin@Freya /]# mount -t ext2 /dev/sdg6 /tmp/config [admin@Freya /]# cat /tmp/config/autorun.sh #!/bin/sh /share/CACHEDEV1_DATA/homes/admin/bin/autorun.sh &
I made it such that it simply just run an autorun.sh from my normal drive, this way, I don't have to go through these hoops, and modify the flash image constantly when I want to modify change something. Right now my script is pretty limited, but for example, it now allows me to add a "search" domain to my /etc/resolv.conf. Yeah, for some reason, the QNAP OS does not let you add search domain for the resolvers, if you use static IPs (with DHCP, it gets it from the DHCP server, of course).