]> git.pld-linux.org Git - packages/tzdata.git/blob - timezone.upstart
bc0ab2964ed54bf4cbfacee35d74517c3bcd996d
[packages/tzdata.git] / timezone.upstart
1 description "Set time zone information"
2
3 start on local-filesystems
4 #console output
5
6 script
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 || :
22 end script
This page took 0.071575 seconds and 2 git commands to generate.