[Top][All Lists]

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

Re: Network Boot Get Hostname In grub.cfg

From: Andrei Borzenkov
Subject: Re: Network Boot Get Hostname In grub.cfg
Date: Thu, 11 Nov 2021 22:00:10 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 11.11.2021 12:36, Federico Vaga wrote:
> Hello,
> I'm trying to get the hostname in `grub.cfg` to point then to
> different rootnfs, or network live images.
> From the manual page:
> I've noticed the existence of `net_<interface>_hostname` but this
> requires to know the `<interface>` name in advance and this is
> platform dependent (as the documentation says).
> Since these systems have only one network connection I thought about
> using `net_default_interface` to ignore the specific name. Here
> problems strarts because neasting variables seems not working and
> doing: `${net_${net_default_interface}_hostname}`

eval "set myhostname=\${net_${net_default_interface}_hostname}"

and use $myhostname in following code

> However, in the documentation variables like `net_default_ip` are
> described as the result of ‘net_${net_default_interface}_ip’.
> Am I doing something wrong? Do you have any suggestion?
> Thanks

reply via email to

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