Bug#467169: grub-pc: [PATCH] fails to handle resume=/dev/... or more than one option - in debconf

Robert Millan rmh at aybabtu.com
Mon Feb 25 17:21:08 UTC 2008


On Sat, Feb 23, 2008 at 05:24:57AM -0800, Alban Browaeys wrote:
> diff -uNr grub2-1.96+20080219.orig/debian/grub-pc.postinst grub2-1.96+20080219/debian/grub-pc.postinst
> --- grub2-1.96+20080219.orig/debian/grub-pc.postinst	2008-02-23 13:56:29.000000000 +0100
> +++ grub2-1.96+20080219/debian/grub-pc.postinst	2008-02-23 13:58:23.000000000 +0100
> @@ -19,6 +19,7 @@
>          echo "Internal error in grub-pc package.  Please file a bug report." >&2
>          exit 1
>        elif [ "$RET" != "" ] ; then
> +      	RET="$(printf '%s' "$RET" | sed 's|/|\\/|g')"
>          sed -i /etc/default/grub -e "s/^\(GRUB_CMDLINE_LINUX\)=.*/\1=\"$RET\"/g"
>          db_set grub-pc/linux_cmdline "" || true
>        fi

Is there any character we could use for the regexp instead of /, that is known
not to collide with any Linux cmdline options ?

If it can be simplified this way, I'd prefer that instead.

Thanks

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)





More information about the Pkg-grub-devel mailing list