]> err.no Git - systemd/commitdiff
Migrate hwclock configuration.
authorMichael Biebl <biebl@debian.org>
Wed, 3 Aug 2011 13:07:27 +0000 (15:07 +0200)
committerTollef Fog Heen <tfheen@err.no>
Wed, 14 Sep 2011 06:31:49 +0000 (08:31 +0200)
Do a one-time migration of the hwclock configuration. If UTC is set to "no" in
/etc/default/rcS, create /etc/adjtime and add the "LOCAL" setting.

debian/changelog
debian/systemd.postinst

index 6aab765964629b3f8ab5b993d586fa025b8efdff..d55870fe42573ecc0bd81f64a4a40bfaf8c247fd 100644 (file)
@@ -11,6 +11,8 @@ systemd (35-1) UNRELEASED; urgency=low
   * As autoreconf doesn't like intltool, override dh_autoreconf and call
     intltoolize and autoreconf ourselves.
   * Add Build-Depends on intltool.
+  * Do a one-time migration of the hwclock configuration. If UTC is set to
+    "no" in /etc/default/rcS, create /etc/adjtime and add the "LOCAL" setting.
 
  -- Tollef Fog Heen <tfheen@debian.org>  Wed, 14 Sep 2011 08:25:17 +0200
 
index 5efbfe6dcc4e7dfef5f897be709dc5bbb22dfc1a..6071df40b60ff72f16c4d3456961aae3897a5d27 100644 (file)
@@ -16,6 +16,13 @@ if [ -n "$2" ]; then
             rmdir --ignore-fail-on-non-empty /cgroup
         fi
     fi
+    # Do a one-time migration of the local time setting
+    if dpkg --compare-versions "$2" lt "33-1"; then
+        . /etc/default/rcS
+        if [ $UTC ="no" ] && [ ! -e /etc/adjtime ]; then
+            echo "0 0 0\0\0LOCAL" > /etc/adjtime
+        fi
+    fi
 fi
 
 systemd-machine-id-setup