]> err.no Git - systemd/commitdiff
Add more safety checks
authorMichael Biebl <biebl@debian.org>
Wed, 3 Aug 2011 15:26:15 +0000 (17:26 +0200)
committerTollef Fog Heen <tfheen@err.no>
Wed, 14 Sep 2011 06:38:18 +0000 (08:38 +0200)
In case /etc/default/rcS is missing or UTC not set.

debian/systemd.postinst

index 6a4c5e999d365d0236e7c976bd61457a266393ca..73e2a11dedff6bfaa78d5a1acc141eeeac6f52e5 100644 (file)
@@ -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