summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-18 02:24:31 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-18 02:24:31 +0200
commit5481ab2b385855b9489debe901918b2d9b27faff (patch)
treef30e4cac039ef179178b6a98504e4d18bb8cfc55 /units
parent2dc11f99480fb0b05fda4f56690fe9365db9f2e8 (diff)
units: add hwclock-load service
Diffstat (limited to 'units')
-rw-r--r--units/hwclock-load.service31
1 files changed, 31 insertions, 0 deletions
diff --git a/units/hwclock-load.service b/units/hwclock-load.service
new file mode 100644
index 000000000..85d56db5d
--- /dev/null
+++ b/units/hwclock-load.service
@@ -0,0 +1,31 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Apply System Clock UTC Offset
+DefaultDependencies=no
+Conflicts=shutdown.target
+Before=shutdown.target udev.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/sbin/hwclock --systz
+
+# Note the weird semantics if hwclock and the kernel here: the first
+# settimeofday() invocation from userspace is special and may be used
+# to set the offset from UTC of the system clock. It is independent
+# of any specific RTC device. This is mostly a crufty hack to support
+# legacy operating systems which insist on storing local time in the
+# RTC.
+
+# Note that we do not run --hctosys here, we assume the kernel
+# includes a compiled in RTC module which is used to initialize the
+# system time as part of kernel setup.
+
+[Install]
+WantedBy=sysinit.target