From 3e65988cf97c7d9a07970dd87595d315ee47df7f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 28 Nov 2007 19:43:15 +0100 Subject: update-initramfs: Fix ro /boot partition check (closes: #451151) Newer kernel in the effort of killing /etc/mtab show mount options, like errors=remount-ro, that is matched for read only. Thanks Jan Niehusmann for report. --- update-initramfs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update-initramfs b/update-initramfs index a257f1c..eb1db44 100755 --- a/update-initramfs +++ b/update-initramfs @@ -266,8 +266,8 @@ ro_boot_check() return 0 fi - boot_opts=$(awk '/boot/{if (match($4, /ro/) && $2 == "/boot") - print "ro"}' /proc/mounts) + boot_opts=$(awk '/boot/{if (match($4, /^ro/) || match($4, /,ro/) \ + && $2 == "/boot") print "ro"}' /proc/mounts) if [ -n "${boot_opts}" ]; then echo "WARNING: /boot is ro mounted." echo "update-initramfs: Not updating ${initramfs}" -- cgit v1.2.3