--- /dev/null
+#!/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
# 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"
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/