Updating UTC handling for wheezy.
authorDaniel Baumann <daniel@debian.org>
Thu, 13 Dec 2012 19:37:25 +0000 (20:37 +0100)
committerDaniel Baumann <daniel@debian.org>
Thu, 13 Dec 2012 19:37:25 +0000 (20:37 +0100)
scripts/config/0070-tzdata

index e4f9443..b17d2df 100755 (executable)
@@ -56,7 +56,33 @@ EOF
 
        if [ -n "${LIVE_UTC}" ]
        then
-               sed -i -e "s|UTC=.*|UTC=${LIVE_UTC}|" /etc/default/rcS
+               if [ -e /run ]
+               then
+                       # wheezy
+                       case "${LIVE_UTC}" in
+                               yes)
+
+cat > /etc/adjtime << EOF
+0.0 0 0.0
+0
+UTC
+EOF
+
+                                       ;;
+
+                               no)
+
+cat > /etc/adjtime << EOF
+0.0 0 0.0
+0
+EOF
+
+                                       ;;
+                       esac
+               else
+                       # squeeze
+                       sed -i -e "s|UTC=.*|UTC=${LIVE_UTC}|" /etc/default/rcS
+               fi
        fi
 
        # Creating state file