]> git.pld-linux.org Git - packages/tzdata.git/commitdiff
- upstart config
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 27 Jan 2011 22:02:24 +0000 (22:02 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    timezone.upstart -> 1.1

timezone.upstart [new file with mode: 0644]

diff --git a/timezone.upstart b/timezone.upstart
new file mode 100644 (file)
index 0000000..bc0ab29
--- /dev/null
@@ -0,0 +1,22 @@
+description "Set time zone information"
+
+start on local-filesystems
+#console output
+
+script
+       . /etc/sysconfig/timezone
+
+       ZONE_FILE="$ZONE_INFO_DIR"
+
+       if [ -n "$ZONE_INFO_SCHEME" -a "$ZONE_INFO_SCHEME" != "posix" ]; then
+               ZONE_FILE="$ZONE_FILE/$ZONE_INFO_SCHEME"
+       fi
+
+       ZONE_FILE="$ZONE_FILE/$TIMEZONE"
+
+       [ -L /etc/localtime ] && [ "$(resolvesymlink /etc/localtime)" = "$ZONE_FILE" ] && exit 0
+
+       printf "Setting time zone information (%s)\n" "$TIMEZONE"
+       cp -af "$ZONE_FILE" /etc/localtime || :
+       restorecon /etc/localtime >/dev/null 2>&1 || :
+end script
This page took 0.353983 seconds and 4 git commands to generate.