[ -L /etc/localtime ] && [ "$(resolvesymlink /etc/localtime)" = "$ZONE_FILE" ] && exit 0
start() {
- if [ ! -f /var/lock/subsys/timezone ]; then
- if [ -f "$ZONE_FILE" ]; then
- rm -f /etc/localtime
+ if [ -f /var/lock/subsys/timezone ]; then
+ return
+ fi
- MESSAGE=$(nls 'Setting time zone information (%s)' "$TIMEZONE")
+ if [ -f "$ZONE_FILE" ]; then
+ rm -f /etc/localtime
- run_cmd "$MESSAGE" cp -af $ZONE_FILE /etc/localtime
- RETVAL=$?
- restorecon /etc/localtime >/dev/null 2>&1
- fi
+ MESSAGE=$(nls 'Setting time zone information (%s)' "$TIMEZONE")
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/timezone
+ run_cmd "$MESSAGE" cp -af $ZONE_FILE /etc/localtime
+ RETVAL=$?
+ restorecon /etc/localtime >/dev/null 2>&1
fi
+
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/timezone
}
stop() {