diff -Nru initramfs-tools-0.122ubuntu8.1/debian/changelog 
initramfs-tools-0.122ubuntu8.1+ppa1/debian/changelog
--- initramfs-tools-0.122ubuntu8.1/debian/changelog     2016-06-06 
20:32:03.000000000 +0200
+++ initramfs-tools-0.122ubuntu8.1+ppa1/debian/changelog        2016-09-13 
22:35:44.000000000 +0200
@@ -1,3 +1,10 @@
+initramfs-tools (0.122ubuntu8.1+ppa1) xenial; urgency=medium
+
+  * make fixrtc catch "n/a" string and fall back to a sane value for the date
+    command instead (LP: #1623125)
+
+ -- Oliver Grawert <o...@ubuntu.com>  Tue, 13 Sep 2016 22:31:46 +0200
+
 initramfs-tools (0.122ubuntu8.1) xenial; urgency=medium
 
   * hook-functions: include ehci-msm in auto_add_modules_list
diff -Nru initramfs-tools-0.122ubuntu8.1/scripts/local-premount/fixrtc 
initramfs-tools-0.122ubuntu8.1+ppa1/scripts/local-premount/fixrtc
--- initramfs-tools-0.122ubuntu8.1/scripts/local-premount/fixrtc        
2016-02-03 18:07:11.000000000 +0100
+++ initramfs-tools-0.122ubuntu8.1+ppa1/scripts/local-premount/fixrtc   
2016-09-13 22:31:43.000000000 +0200
@@ -96,6 +96,11 @@
         DATE="/bin/date -D%c"
         date -D%c 2>/dev/null || DATE=/bin/date
 
+        if [ "$MOUNTDATE" = "n/a" ]; then
+            # some versions of mkfs set n/a now, date is not happy with this so
+            # let us use some half way sane epoch instead
+            MOUNTDATE="Fri Jan 1 00:00:00 1999"
+        fi
         TIMESTR=$MOUNTDATE
         TIME=$(${DATE} --utc --date "${TIMESTR}" +%s)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1623125

Title:
  fixrtc script does not catch "Last mount time: n/a" string

To manage notifications about this bug go to:
https://bugs.launchpad.net/snappy/+bug/1623125/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to