grub-devel
[Top][All Lists]
Advanced

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

Re: avoiding quotes in kernel cmdline


From: Daniel Kiper
Subject: Re: avoiding quotes in kernel cmdline
Date: Fri, 13 Mar 2020 12:59:32 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Fri, Mar 13, 2020 at 12:02:50PM +0100, Olaf Hering wrote:
> With code like this, the resulting kernel cmdline has backslashes before 
> either ' or ".
> I think var="\"str\"" or var="'str'" has to be used to place either " or ' 
> into the variable.
> How can I avoid the backslash in the kernel cmdline?
>
> udev_rule="udev.rule=\"mac=${net_default_mac},name=uplink\""
> udev_rule="udev.rule='mac=${net_default_mac},name=uplink'"
> cmdline="${udev_rule} install=${install} start_shell linemode=1 
> console=ttyS0,115200"
> menuentry "boot" {
>  linux  (http,${ip})/path/to/linux ${cmdline}
>  initrd (http,${ip})/path/to/initrd
> }

Both var="\"str\"" and var="'str'" should work. Does not they? Do you
still get backslashes in ${cmdline}?

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]