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/clock | |
parent | 1f4422c72f968405a0b8bf56d4f9c3b619b1b80d (diff) |
Adopt a more C style for scripts and remove vim settings.
Diffstat (limited to 'init.d.Linux/clock')
-rwxr-xr-x | init.d.Linux/clock | 23 |
1 files changed, 14 insertions, 9 deletions
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 : |