60秒ごとにLinuxシステムを再起動するには?

60秒ごとにLinuxシステムを再起動するには?

Linux 3.2.6 Angstromディストリビューションを実行している組み込みハードウェアの一部をデバッグしているため、60秒ごとにデバイスを再起動する必要があります。私はこれを試しました:

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

コマンドラインではうまく機能しますが、起動で実行するとデバイスがシャットダウンし始め、停止します。

Deactivating swap...
Unmounting local filesystems...

Give root password for system maintenance
(or type Control-D for normal startup):

ファイルシステムは読み取り専用モードです。なぜこれが起こるのか、それとも他の方法があるのか​​わかりません。提案を歓迎します。ありがとうございます。

ベストアンサー1

shutdown -r 60に接続する/etc/rc.local

おすすめ記事