]>
Commit | Line | Data |
---|---|---|
48cb23d2 ER |
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 |