Bug 217454 - add getkey flag to echo the key that was pressed
Summary: add getkey flag to echo the key that was pressed
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard: bzcl34nup
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-27 23:06 UTC by Will Woods
Modified: 2014-03-17 03:04 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-04-13 16:51:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch against getkey.c from initscripts-8.45.6 (1.35 KB, patch)
2006-11-27 23:06 UTC, Will Woods
no flags Details | Diff

Description Will Woods 2006-11-27 23:06:29 UTC
getkey should have a flag that makes it echo the key that was pressed. 

This could be used to allow rc.sysinit to have multiple entries like "Press 'I'
to enter interactive startup."

Comment 1 Will Woods 2006-11-27 23:06:29 UTC
Created attachment 142243 [details]
patch against getkey.c from initscripts-8.45.6

Comment 2 Bill Nottingham 2006-11-28 07:09:22 UTC
Not sure what you mean by 'this could be used'... it's normally echoed anyway.

Comment 3 Will Woods 2006-11-28 16:48:53 UTC
Not to stdout. This patch lets you do stuff like:

echo "Do you wanna? [Y/N]"
ch=$(getkey -k YN)
if [ "$ch" == "Y" ]; then
...

Comment 4 Bill Nottingham 2006-11-28 16:57:49 UTC
Can't you just use 'read' for that?

(The reason getkey is used in rc.sysinit is so it can read something without
actually prompting.)

Comment 5 Will Woods 2006-11-28 17:04:03 UTC
Right. So if you wanted to have multiple options at startup, say:

Press 'I' to enter interactive startup.
Press 'T' to start in text mode.

You'd need to be able to differentiate between 'I' and 'T' being pressed.

Perhaps, though, something more robust could be written to do a proper startup menu.

Comment 6 Bill Nottingham 2006-11-28 17:07:14 UTC
I'd prefer something else. 'T' wouldn't necessarily work right, other than
calling 'telinit' at the end of rc.sysinit.

Comment 7 Bug Zapper 2008-04-03 18:43:02 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 8 Will Woods 2008-04-13 16:51:25 UTC
I think we agree that the feature I was proposing here is still a good idea, but
this implementation is not the best way to do it.

Closing NOTABUG.


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