]> git.pld-linux.org Git - packages/tzdata.git/blob - timezone.sh
up to 2013c
[packages/tzdata.git] / timezone.sh
1 #!/bin/sh
2
3 ZONE_FILE="$ZONE_INFO_DIR"
4
5 if [ -n "$ZONE_INFO_SCHEME" -a "$ZONE_INFO_SCHEME" != "posix" ]; then
6         ZONE_FILE="$ZONE_FILE/$ZONE_INFO_SCHEME"
7 fi
8
9 ZONE_FILE="$ZONE_FILE/$TIMEZONE"
10
11 [ -L /etc/localtime ] && [ "$(resolvesymlink /etc/localtime)" = "$ZONE_FILE" ] && exit 0
12 [ -f "$ZONE_FILE" ] || exit 2
13
14 rm -f /etc/localtime
15
16 cp -af "$ZONE_FILE" /etc/localtime
17 RETVAL=$?
18 restorecon /etc/localtime >/dev/null 2>&1
19 exit $RETVAL
This page took 0.052892 seconds and 3 git commands to generate.