[Voyage-linux] problems with executing scripts during boot

Steen Pedersen (spam-protected)
Sun Dec 4 18:26:21 HKT 2011


Hi I need to execute a script during booting (I need to make sure the
extern USB HDD is mounted - which sometime it isn't). I think that
sometime Voyage starts so fast that it isn't ready when Voyage tries
to mount it.
I therefore would like to remount it, restart Samba and Minidlna late
in the booting process.

So I would like to execute this script (waitforusb) during booting.
Therefore I made the file waitforusb and put it here;
/etc/init.d/waitforusb

Waitforusb contains this:
#!/bin/sh
echo "sleep 20 then mount"
sleep 20
mount -a
echo "restart samba"
sleep 5
/etc/init.d/samba restart
sleep 10
minidlna -R

Then I did:
#chmod 755 /etc/init.d/waitforusb

Then I made links in the different runlevels
#ln -s /etc/init.d/waitforusb /etc/rcS.d/S25waitforusb
#ln -s /etc/init.d/waitforusb /etc/rc2.d/S25waitforusb
#ln -s /etc/init.d/waitforusb /etc/rc3.d/S25waitforusb
#ln -s /etc/init.d/waitforusb /etc/rc4.d/S25waitforusb
#ln -s /etc/init.d/waitforusb /etc/rc5.d/S25waitforusb

BUT it wont execute during boot.

If I after a boot write
# /etc/init.d/waitforusb

Then it execute fine - so why isn't it run during booting?

Please excuse if this is a simple question, but I'm very new to linux.

Regards
Steen




More information about the Voyage-linux mailing list