From: Michael Biebl Date: Wed, 3 Aug 2011 13:07:27 +0000 (+0200) Subject: Migrate hwclock configuration. X-Git-Tag: 36-1~17 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99b0d95dbc42dc17c63294abeff53733055b8ad2;p=systemd Migrate hwclock configuration. 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. --- diff --git a/debian/changelog b/debian/changelog index 6aab7659..d55870fe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Wed, 14 Sep 2011 08:25:17 +0200 diff --git a/debian/systemd.postinst b/debian/systemd.postinst index 5efbfe6d..6071df40 100644 --- a/debian/systemd.postinst +++ b/debian/systemd.postinst @@ -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