diff options
author | Roy Marples <roy@marples.name> | 2008-01-11 12:13:46 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-01-11 12:13:46 +0000 |
commit | 3bf49a9bd19d5bbcf6976dd42b4f87f1b173e287 (patch) | |
tree | 8b4d6121f0d4b921566eeec2844c9bf76131de78 /init.d.Linux/numlock | |
parent | 1f4422c72f968405a0b8bf56d4f9c3b619b1b80d (diff) |
Adopt a more C style for scripts and remove vim settings.
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 : |