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

Bug#488865: initramfs-tools: buggy check for read-only /boot



On Tue, Jul 01, 2008 at 08:54:49PM +0200, Zbyszek Szmek wrote:
> 
> The script /usr/sbin/update-initramfs checks if /boot is mounted read-only,
> and aborts if so. Unfortunately, the test also triggers in other cases, 
> e.g. on option errors=continue (because this phrase contains 'ro').
> 
> A simple fix (check for 'ro' delimited by commas or the begging or the 
> end of options string):

right old kernels would print all options there.
anyway fixed in unstable version, just get it from backports.
 
> --- /usr/sbin/update-initramfs.0        2008-07-01 20:31:03.000000000 +0200
> +++ /usr/sbin/update-initramfs  2008-07-01 20:31:44.000000000 +0200
> @@ -237,7 +237,7 @@
>  ro_boot_check()
>  {
>         [ -r /proc/mounts ] || return 0
> -       boot_opts=$(awk '/boot/{if (match($4, /ro/) && $2 == "/boot")
> +       boot_opts=$(awk '/boot/{if (match($4, /(^|,)ro($|,)/) && $2 == "/boot")
>                 print "ro"}' /proc/mounts)
>         if [ -n "${boot_opts}" ]; then
>                 echo "WARNING: /boot is ro mounted."
> 
> 
> 
> -- System Information:
> Omitted because reporting from different installation.
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 



Reply to: