Contribution: Checking for single Key press with Busybox ash

Harald Becker ralda at gmx.de
Fri Jul 12 14:44:47 UTC 2013


Hi All,

as here are many shell script novices, I want to post a simple
Busybox ash script to check for a single key press. I use this
during startup to switch from normal operation to rescue mode. If
no Escape key is pressed within 2 seconds the system starts up in
normal mode, else a simple rescue shell is invoked via sulogin.

The script just uses only usual Busybox applets and does not
need any special program to check the keyboard.

Script attached ... 

Comments/questions welcome.

--
Harald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: press_escape.sh
Type: application/x-shellscript
Size: 487 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20130712/ea45cfc4/attachment.bin>


More information about the busybox mailing list