diff options
Diffstat (limited to 'init.d.Linux/numlock')
-rwxr-xr-x | init.d.Linux/numlock | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/init.d.Linux/numlock b/init.d.Linux/numlock index 2defe69c..8ad4a66a 100755 --- a/init.d.Linux/numlock +++ b/init.d.Linux/numlock @@ -6,11 +6,13 @@ description="Turns numlock on for the consoles." ttyn=${rc_tty_number:-${RC_TTY_NUMBER}:-12} -depend() { +depend() +{ need localmount } -_setleds() { +_setleds() +{ [ -z "$1" ] && return 1 local dev=/dev/tty t= i=1 retval=0 @@ -24,16 +26,16 @@ _setleds() { return ${retval} } -start() { +start() +{ ebegin "Enabling numlock on ttys" _setleds + eend $? "Failed to enable numlock" } -stop() { +stop() +{ ebegin "Disabling numlock on ttys" _setleds - eend $? "Failed to disable numlock" } - -# vim: set ts=4 : |