help-grub
[Top][All Lists]
Advanced

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

Re: Unknown command 'else'?


From: Andrei Borzenkov
Subject: Re: Unknown command 'else'?
Date: Tue, 22 Sep 2015 10:54:14 +0300

On Tue, Sep 22, 2015 at 8:52 AM, Steven Shiau <address@hidden> wrote:
...
> BTW, one more question. Is that possible to do some variable substitution in
> preconfig?
...
> I tried to use:
> configfile $prefix/grub.cfg-01-${net_default_mac//:/-}
> However, this bash variable substitution apparently is not working. So in
> the preconifg, rescue mode, how can I make that?
>

It does not work at all, preconfig or not preconfig. You could try to
preload tr module and use

tr --set pretty_mac - : $net_default_mac

although I'm not sure how it will handle lone `-' (argument parsing); probably

tr --set pretty_mac x- x: $net_default_mac

is more foolproof.

Of course all notes about lack of conditional error handling at this
stage still apply ...



reply via email to

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