summaryrefslogtreecommitdiff
path: root/beagle/debian-rfs/lib/udev/hwclock-set
diff options
context:
space:
mode:
Diffstat (limited to 'beagle/debian-rfs/lib/udev/hwclock-set')
-rwxr-xr-xbeagle/debian-rfs/lib/udev/hwclock-set17
1 files changed, 17 insertions, 0 deletions
diff --git a/beagle/debian-rfs/lib/udev/hwclock-set b/beagle/debian-rfs/lib/udev/hwclock-set
new file mode 100755
index 0000000..2dcc8ee
--- /dev/null
+++ b/beagle/debian-rfs/lib/udev/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