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

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to