Bug 54481 - /sbin/getkey bugs
Summary: /sbin/getkey bugs
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: FC5Target
TreeView+ depends on / blocked
 
Reported: 2001-10-09 19:29 UTC by Steve Bonneville
Modified: 2014-03-17 02:23 UTC (History)
1 user (show)

Fixed In Version: 8.22-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-01 18:01:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Bonneville 2001-10-09 19:29:19 UTC
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
to count
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,
the system
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
default.)

/sbin/getkey could probably also use some documentation, like a man page!

Reproducible: Always
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
output)
  /sbin/getkey -c -1 -m $"Counting down from %d" n         (Countdown
forever)

Press 'n' with the above to break out of the countdown.

Comment 1 Miloslav Trmač 2006-02-01 18:01:28 UTC
Fixed in initscripts-8.22.1.  Thanks for your report.


Note You need to log in before you can comment on or make changes to this bug.