[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can GRUB2 request netboot config based on client MAC or IP?
From: |
Andrey Borzenkov |
Subject: |
Re: Can GRUB2 request netboot config based on client MAC or IP? |
Date: |
Sun, 23 Jun 2013 09:39:52 +0400 |
В Sat, 22 Jun 2013 16:22:31 -0400
Andrew Davidoff <address@hidden> пишет:
> On Sat, Jun 22, 2013 at 7:18 AM, Andrey Borzenkov <address@hidden> wrote:
> > Yes, there is regexp command. As you are using current bzr sources,
> > this command is documented there.
>
> Thanks Andrey. I got this all working. One thing - it seems that I am
> unable to export $net_default_mac so that subsidiary configfile's can
> see it.
I briefly tested it using QEMU and I cannot reproduce it. After
"configfile /some/other/file" I still see the same variables, in
particular net_default_ip and net_default_mac. So you need to show your
configuration files.
> If I do:
>
> export net_default_mac
>
Internally this variable is aliased to return MAC address of the
correct interface (it is alias for net_pxe_mac). When you set it from
configuration file you probably destroy this magic and it becomes plain
variable which does not have any value assigned so far.
> in grub.cfg then load another config, net_default_mac is set to
> (null). If however I set my own variable to the value of
> $net_default_mac in grub.cfg, then export that variable in the same
> way I was trying to export net_default_mac, the subsidiary configfile
> is able to read the expected MAC address from my variable. I am not
> sure if this is expected behavior or not. I realize that with
> net_default_mac being a built in, it could be special. Using my own
> variable to work around this is fine, though.
>
> Thanks again for your help on this!
> Andy