From: Michael Biebl Date: Wed, 3 Aug 2011 15:26:15 +0000 (+0200) Subject: Add more safety checks X-Git-Tag: 36-1~11 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62bf1988af6ffae3b531a9fbf8be265d7fc54fd5;p=systemd Add more safety checks In case /etc/default/rcS is missing or UTC not set. --- 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