[Pkg-sysvinit-devel] Re: Fixing hwclock.sh
Petter Reinholdtsen
pere at hungry.com
Fri Jan 6 15:05:16 UTC 2006
[Henrique de Moraes Holschuh]
> Can either init itself or rc be teached to run sulogin and reboot if
> the regular rc runlevel scripts execution borks in any way? One or
> two forks before we run the whole thing is not bad if it increases
> resiliency, even if that means one extra process sitting around.
Perhaps we should do something like this? It will run sulogin if exit
is used while the script is executed, and:
on_exit() {
sulogin
}
trap on_exit EXIT # Enable emergency handler
[...]
trap - EXIT # Disable emergency handler
exit 0 # Exit normally
Is this working with all bourne shells? I believe so, but am not
sure.
More information about the Pkg-sysvinit-devel
mailing list