]> git.pld-linux.org Git - packages/tzdata.git/blobdiff - timezone.init
- cosmetics
[packages/tzdata.git] / timezone.init
index 0c9b93b6fe52c3860b9dc78dd277101aa998c9e6..aca05d3aaee49dc2ccf6b14c5251c2506882d2da 100644 (file)
@@ -25,19 +25,21 @@ ZONE_FILE="$ZONE_FILE/$TIMEZONE"
 [ -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() {
This page took 0.03177 seconds and 4 git commands to generate.