I need to save different messages for logging purposes for calling reboot, halt, and plain switching the power off in Busybox.

Normally, I'd just save the messages in scripts called from inittab for runlevels 0 and 6 (and no message means power fail), but Busybox init ignores the runlevel field in inittab completely.

One way I could see is writing wrapper scripts around the commands, that save the messages then launch their respective original commands, but that's not a very pretty solution.

Do you have any better idea how to differentiate them?

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.