From 3bf49a9bd19d5bbcf6976dd42b4f87f1b173e287 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 11 Jan 2008 12:13:46 +0000 Subject: Adopt a more C style for scripts and remove vim settings. --- init.d.Linux/numlock | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'init.d.Linux/numlock') 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 : -- cgit v1.2.3