]> git.pld-linux.org Git - packages/tzdata.git/blame - timezone.upstart
up to 2015f
[packages/tzdata.git] / timezone.upstart
CommitLineData
48cb23d2
ER
1description "Set time zone information"
2
3start on local-filesystems
4#console output
5
6script
7 . /etc/sysconfig/timezone
8
9 ZONE_FILE="$ZONE_INFO_DIR"
10
11 if [ -n "$ZONE_INFO_SCHEME" -a "$ZONE_INFO_SCHEME" != "posix" ]; then
12 ZONE_FILE="$ZONE_FILE/$ZONE_INFO_SCHEME"
13 fi
14
15 ZONE_FILE="$ZONE_FILE/$TIMEZONE"
16
17 [ -L /etc/localtime ] && [ "$(resolvesymlink /etc/localtime)" = "$ZONE_FILE" ] && exit 0
18
19 printf "Setting time zone information (%s)\n" "$TIMEZONE"
20 cp -af "$ZONE_FILE" /etc/localtime || :
21 restorecon /etc/localtime >/dev/null 2>&1 || :
22end script
This page took 0.122157 seconds and 4 git commands to generate.