[BusyBox] patch to add 'reboot' to inittab
Erik Andersen
andersen at codepoet.org
Sat Nov 10 01:36:55 UTC 2001
On Mon Nov 05, 2001 at 11:04:14AM -0500, Williams, Kevin M. wrote:
> This patch for init.c adds 'reboot' as a possible action for inittab. Now
> when I add the following to inittab:
>
> ::wait:-/path/to/myapp.exe
> ::reboot:-/path/to/myapp.exe
>
> It starts myapp.exe at startup, and if it ever exits, the entire system
> reboots. For my embedded system, operating remotely and with no keyboard
> input, this is a good thing.
I think this duplicates existing functionality. How about the
following instead? Add something like to this to your inittab:
::respawn:/etc/init.d/myapp.sh
Then have /etc/init.d/myapp.sh look something like:
#!/bin/sh
/bin/myapp.exe
/sbin/poweroff;
sleep 9999;
Does something like that work for you?
-Erik
--
Erik B. Andersen email: andersen at codepoet-consulting.com
--This message was written using 73% post-consumer electrons--
More information about the busybox
mailing list