packages: tzdata/timezone.upstart (NEW) - upstart config
glen
glen at pld-linux.org
Thu Jan 27 23:02:29 CET 2011
Author: glen Date: Thu Jan 27 22:02:29 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- upstart config
---- Files affected:
packages/tzdata:
timezone.upstart (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/tzdata/timezone.upstart
diff -u /dev/null packages/tzdata/timezone.upstart:1.1
--- /dev/null Thu Jan 27 23:02:29 2011
+++ packages/tzdata/timezone.upstart Thu Jan 27 23:02:24 2011
@@ -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
================================================================
More information about the pld-cvs-commit
mailing list