From 62bf1988af6ffae3b531a9fbf8be265d7fc54fd5 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 3 Aug 2011 17:26:15 +0200 Subject: [PATCH] Add more safety checks In case /etc/default/rcS is missing or UTC not set. --- debian/systemd.postinst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/systemd.postinst b/debian/systemd.postinst index 6a4c5e99..73e2a11d 100644 --- a/debian/systemd.postinst +++ b/debian/systemd.postinst @@ -8,8 +8,10 @@ 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 + if [ -f /etc/default/rcS ]; + . /etc/default/rcS + fi + if [ "$UTC" = "no" ] && [ ! -e /etc/adjtime ]; then echo "0.0 0 0.0\n0\nLOCAL" > /etc/adjtime fi fi -- 2.39.5