From 99b0d95dbc42dc17c63294abeff53733055b8ad2 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 3 Aug 2011 15:07:27 +0200 Subject: [PATCH] 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. --- debian/changelog | 2 ++ debian/systemd.postinst | 7 +++++++ 2 files changed, 9 insertions(+) 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 -- 2.39.5