diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2009-10-05 05:04:23 -0600 |
---|---|---|
committer | LaMont Jones <lamont@debian.org> | 2009-10-05 05:06:44 -0600 |
commit | 5c71a54a3650f3280394b0a6d21892e0aa452214 (patch) | |
tree | 89f140627774942c218abae04930083b30796f2a /debian | |
parent | a62e1e3caa0df777877d639f6e8aefa27fecc3d4 (diff) | |
download | util-linux-old-5c71a54a3650f3280394b0a6d21892e0aa452214.tar.gz |
85-hwclock.rules only ran hwclock if BADYEAR defined.
Addresses-Debian-Bug: 543375
Signed-off-by: LaMont Jones <lamont@debian.org>
Diffstat (limited to 'debian')
-rw-r--r-- | debian/hwclock-set | 17 | ||||
-rw-r--r-- | debian/hwclock.rules | 6 | ||||
-rwxr-xr-x | debian/rules | 1 |
3 files changed, 19 insertions, 5 deletions
diff --git a/debian/hwclock-set b/debian/hwclock-set new file mode 100644 index 00000000..2dcc8eee --- /dev/null +++ b/debian/hwclock-set @@ -0,0 +1,17 @@ +#!/bin/sh +# Reset the System Clock to UTC if the hardware clock from which it +# was copied by the kernel was in localtime. + +dev=$1 + +if [ -f /etc/default/rcS ] ; then + . /etc/default/rcS +fi + +if [ yes != "$UTC" ] ; then + if [ yes = "$BADYEAR" ] ; then + /sbin/hwclock --rtc=$dev --systz --localtime --noadjfile --badyear + else + /sbin/hwclock --rtc=$dev --systz --localtime --noadjfile + fi +fi diff --git a/debian/hwclock.rules b/debian/hwclock.rules index fc22468c..e1e66e2e 100644 --- a/debian/hwclock.rules +++ b/debian/hwclock.rules @@ -1,8 +1,4 @@ # Reset the System Clock to UTC if the hardware clock from which it was # copied by the kernel was in localtime. -KERNEL=="rtc0", IMPORT{file}="/etc/default/rcS" -KERNEL=="rtc0", ENV{UTC}!="yes", ENV{BADYEAR}!="yes", \ - RUN+="/sbin/hwclock --rtc=$root/$name --systz --localtime --noadjfile" -KERNEL=="rtc0", ENV{UTC}!="yes", ENV{BADYEAR}=="yes", \ - RUN+="/sbin/hwclock --rtc=$root/$name --systz --localtime --noadjfile --badyear" +KERNEL=="rtc0", RUN+="/lib/udev/hwclock-set $root/$name" diff --git a/debian/rules b/debian/rules index 5f934769..70c8a3e1 100755 --- a/debian/rules +++ b/debian/rules @@ -115,6 +115,7 @@ endif fi if [ -f debian/util-linux/sbin/hwclock ] ; then \ install -m 644 debian/hwclock.rules debian/util-linux/lib/udev/rules.d/85-hwclock.rules; \ + install -m 755 debian/hwclock-set debian/util-linux/lib/udev/hwclock-set; \ fi # copy blkid library and symlink into udeb ln debian/libblkid1/lib/libblkid.so.1.* debian/libblkid1-udeb/lib/ |