[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#468116: update-initramfs: ro_bootcheck fix.



Package: initramfs-tools
Severity: wishlist
Version: 0.91e
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch hardy ubuntu

Attached is a patch to fix a possible ro_bootcheck error. The Ubuntu changelog contains the following:

* Fix broken test in ro_boot_check (LP: #187282).  It was matching ro as a subword.

The patch applies against git head. See Ubuntu bug #187282, https://launchpad.net/bugs/187282 for more information.
diff -urN initramfs-tools/update-initramfs initramfs-tools.new/update-initramfs
--- initramfs-tools/update-initramfs	2008-02-26 11:04:36.943676705 +1100
+++ initramfs-tools.new/update-initramfs	2008-02-26 11:07:55.999676705 +1100
@@ -267,8 +267,7 @@
 		return 0
 	fi
 
-	boot_opts=$(awk '/boot/{if ((match($4, /^ro/) || match($4, /,ro/)) \
-		&& $2 == "/boot") print "ro"}' /proc/mounts)
+	boot_opts=$(awk '/boot/{if (match($4, /([^a-zA-Z0-9]|^)ro([^a-zA-Z0-9]|$)/) && $2 == "/boot") print "ro"}' /proc/mounts)
 	if [ -n "${boot_opts}" ]; then
 		echo "WARNING: /boot is ro mounted."
 		echo "update-initramfs: Not updating ${initramfs}"

Attachment: signature.asc
Description: Digital signature


Reply to: