Red Hat Bugzilla – Bug 54481
Last modified: 2014-03-16 22:23:44 EDT
Description of Problem:
The /sbin/getkey program has some bugs when certain values are used with
the -c option.
If '-c 0' is used, then any message set with -m will fail to be displayed
and getkey will wait for input indefinitely.
If -c is used with a negative number, it appears that getkey will continue
downward toward negative infinity.
The rc.sysinit file uses -c with -m in order to display a countdown message
to control how
many seconds to wait for input before selecting the default autofsck option
in a filesystem
recovery situation. If /etc/sysconfig/autofsck sets AUTOFSCK_TIMEOUT to 0,
will wait for input forever without displaying any message. (This might
sort-of make sense,
as the message it would display now would probably be "Press Y within 0
seconds to force file system integrity check". That message wouldn't make
sense in either the case where
'-c 0' is supposed to indicate an infinite wait OR instant selection of the
/sbin/getkey could probably also use some documentation, like a man page!
Steps to Reproduce:
/sbin/getkey -c 5 -m $"Counting down from %d" n (Works fine)
/sbin/getkey -c 0 -m $"Counting down from %d" n (No text
/sbin/getkey -c -1 -m $"Counting down from %d" n (Countdown
Press 'n' with the above to break out of the countdown.
Fixed in initscripts-8.22.1. Thanks for your report.