summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2007-11-28 19:43:15 +0100
committermaximilian attems <max@stro.at>2007-11-28 19:43:15 +0100
commit3e65988cf97c7d9a07970dd87595d315ee47df7f (patch)
tree1bc4167c99cc03a086068c400822132463091ab1
parent89ba49b87ef14314223222d751e01373b0ec08a6 (diff)
downloadinitramfs-tools-3e65988cf97c7d9a07970dd87595d315ee47df7f.tar.gz
initramfs-tools-3e65988cf97c7d9a07970dd87595d315ee47df7f.zip
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 <jan@gondor.com> for report.
-rwxr-xr-xupdate-initramfs4
1 files 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}"