I am debugging some embedded hardware that runs Linux 3.2.6 Angstrom distro, I need the unit to reboot every 60 seconds. I tried this:
In /etc/rc5.d : S99reboot -> /home/root/test.sh
/home/root/test.sh contains only this: /home/root/rebootunit.sh&
/home/root/rebootunit.sh has this:
echo "sleep 60 and reboot"
sleep 60
reboot
works fine from the command line, but when run from startup, the unit starts to shutdown, then gets stuck with this:
Deactivating swap...
Unmounting local filesystems...
Give root password for system maintenance
(or type Control-D for normal startup):
And the filesystem is in read-only mode. I'm not sure why this happened, or if there is another way to do this - I'm open to suggestions, thanks
(sleep 60 && reboot) &
so your init script finishes. Maybe it's not happy that you tried to reboot before your script (and thus the boot) was done.