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/clock | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'init.d.Linux/clock') diff --git a/init.d.Linux/clock b/init.d.Linux/clock index 0d590a9e..5ac65925 100755 --- a/init.d.Linux/clock +++ b/init.d.Linux/clock @@ -21,7 +21,8 @@ else utc_cmd="--localtime" fi -depend() { +depend() +{ if yesno ${clock_adjfile}; then use checkroot else @@ -29,7 +30,8 @@ depend() { fi } -setupopts() { +setupopts() +{ case "${RC_SYS}" in UML|VPS|XENU) utc="${RC_SYS}" @@ -55,7 +57,8 @@ setupopts() { } # hwclock doesn't always return non zero on error -_hwclock() { +_hwclock() +{ local err="$(hwclock "$@" 2>&1 >/dev/null)" [ -z "${err}" ] && return 0 @@ -63,7 +66,8 @@ _hwclock() { return 1 } -start() { +start() +{ local retval=0 errstr="" setupopts @@ -97,7 +101,8 @@ start() { return 0 } -stop() { +stop() +{ # Don't tweak the hardware clock on LiveCD halt. [ -n "${CDBOOT}" ] && return 0 yesno ${clock_systohc} || return 0 @@ -122,14 +127,14 @@ stop() { eend ${retval} "Failed to sync clocks" } -save() { +save() +{ clock_systohc="yes" stop } -show() { +show() +{ setupopts hwclock --show "${utc_cmd}" ${clock_args} } - -# vim: set ts=4 : -- cgit v1.2.3