diff options
Diffstat (limited to 'debian/hwclock.udev')
-rw-r--r-- | debian/hwclock.udev | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/hwclock.udev b/debian/hwclock.udev new file mode 100644 index 00000000..d768f900 --- /dev/null +++ b/debian/hwclock.udev @@ -0,0 +1,29 @@ +#!/bin/sh +# udev helper for hwclock +# +# This is based on the hwclock.sh init script, but somewhat simplified. + +[ ! -x /sbin/hwclock ] && exit 0 +. /etc/default/rcS + +[ "$GMT" = "-u" ] && UTC="yes" +case "$UTC" in + no|"") GMT="--localtime" + UTC="" + ;; + yes) GMT="--utc" + UTC="--utc" + ;; + *) exit 1 ;; +esac + +case "$BADYEAR" in + no|"") BADYEAR="" ;; + yes) BADYEAR="--badyear" ;; + *) exit 1 ;; +esac + +# Copies Hardware Clock time to System Clock using the correct +# timezone for hardware clocks in local time, and sets kernel +# timezone. DO NOT REMOVE. +/sbin/hwclock --hctosys $GMT $HWCLOCKPARS $BADYEAR |