It’s useful once you’ve added packages to the StorCenter IX2-200 to have certain daemons start when the device starts up. I know from having a dodgy dishwasher that trips the power on certain cycles (yes I know I should have a UPS :-)) that it becomes annoying pretty fast to have to SSH onto your device to startup SABnzbd+ etc.
What became apparent is that adding services as normal by creating a script in init.d and running update-rc.d doesn’t work and the service is not persistent. From a bit of reading on the web, it seems that the StorCenter overwrites certain volumes at startup.
To set up your own services / daemons, you need to list a script in /mnt/apps/usr/local/cfg/sohoProcs.xml. The problem is that this exists in a read-only partition, so to edit this file, you need to make it writable.
DISCLAIMER!: I’ve run these commands myself with no ill affects, but I take no responsibility if you brick your device. Run at your own risk!
To make the partition writable:
mknod -m0660 /dev/loop3 b 7 3
chown root.disk /dev/loop3
mount -o loop /boot/images/apps /tmp/apps
Make a backup copy of the config:
cp /tmp/apps/usr/local/cfg/sohoProcs.xml /tmp/apps/usr/local/cfg/sohoProcs.xml.bk
Edit the config – I use nano as I’ve installed it using ipkg (yeah, I’m not hardcode 🙂 ), but substitute this for vi or similar if that’s what you use:
I replaced the thumbnails program declaration (which was disabled) with a new script I’d added in /opt/etc/init.d/start_init_scripts.sh. I guess you could add your own <Program> declaration if you wanted.
<Program Name="thumbnails" Path="/opt/etc/init.d/start_init_scripts.sh">
<SysOption MaxMem="96M" Nice="15" Restart="-1"/>
Then it’s a case of making the script do what you need. Mine starts any script in the /opt/etc/init.d/ directory that starts with “S”…
if [ -d /opt/etc/init.d ]; then
for f in /opt/etc/init.d/S* ; do
#[ -x $f ] && $f start
$f start | tee -a /opt/var/log/boot
#this will start the original thumbnails
Hope this helps someone.