Bug 17667 - /etc/rc.d/init.d/keytable has "status" listed, but no status function
Summary: /etc/rc.d/init.d/keytable has "status" listed, but no status function
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: console-tools
Version: 7.0
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-09-18 23:02 UTC by Gregory Leblanc
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-09-18 23:02:54 UTC
Embargoed:


Attachments (Terms of Use)

Description Gregory Leblanc 2000-09-18 23:02:52 UTC
running '/etc/rc.d/init.d/keytable' gets you a list of possible operations,
one of which is 'status'.  Running '/etc/rc.d/init.d/keytable status' gives
'no status available for this package'.
A preferable option would be to have 'keytable status' check
'/etc/sysconfig/keyboard', and grab the contents of the 'keytable'
parameter, but I'm not sure how to do that.  In the mean time, here's the
'status' removed from the package.

--- keytable~	Wed Jul 19 14:17:22 2000
+++ keytable	Mon Sep 18 16:02:50 2000
@@ -43,11 +43,6 @@
 	RETVAL=$?
 }
 
-status() {
-	echo "No status available for this package"
-	exit 0
-}
-
 condrestart() {
 	[ -f /var/lock/subsys/keytable ] && start
 }
@@ -69,7 +64,7 @@
 		condrestart
 		;;
 	*)
-		echo "Usage: keytable {start|stop|restart|reload|condrestart|status}"
+		echo "Usage: keytable {start|stop|restart|reload|condrestart}"
 		exit 1
 esac

Comment 1 Bernhard Rosenkraenzer 2000-09-23 15:04:00 UTC
Having status read out the content of sysconfig wouldn't be a good thing - if
loadkeys didn't run (it's not a daemon, so this can't be checked with ps or the
likes), it would give bogus information and the user would wonder why.
Since loadkeys modifies the kernel keyboard table, the only way to guess the
currently loaded keyboard layout would require root access.

Turning off status isn't a good idea either - each init script is supposed to
handle the basic requests "start, stop, restart, condrestart, status" (a valid
command line for any of them should never return an error), so a meaningless
message like the one we're having is the way to go.


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