[arch-releng] [PATCH 2/4] be more flexible about finding the pxe boot interface

Christian Hesse list at eworm.de
Fri May 27 06:44:26 UTC 2016


Gerardo Exequiel Pozzi <vmlinuz386 at gmail.com> on Thu, 2016/05/26 21:09:
> On 05/26/16 18:53, Christian Hesse wrote:
> > From: Christian Hesse <mail at eworm.de>
> > 
> > Booting from iPXE we can set bootif_mac without having BOOTIF around.
> > 
> > Signed-off-by: Christian Hesse <mail at eworm.de>
> > ---
> >  archiso/initcpio/hooks/archiso_pxe_common | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/archiso/initcpio/hooks/archiso_pxe_common
> > b/archiso/initcpio/hooks/archiso_pxe_common index 66eecfa..cedf585 100644
> > --- a/archiso/initcpio/hooks/archiso_pxe_common
> > +++ b/archiso/initcpio/hooks/archiso_pxe_common
> > @@ -10,9 +10,12 @@ run_hook () {
> >      # /tmp/net-*.conf
> >  
> >      if [[ -n "${ip}" ]]; then
> > -        if [[ -n "${BOOTIF}" ]]; then
> > +        if [[ -z "${bootif_mac}" && -n "${BOOTIF}" ]]; then
> >              bootif_mac=${BOOTIF#01-}
> >              bootif_mac=${bootif_mac//-/:}
> > +        fi
> > +
> > +        if [[ -n "${bootif_mac}" ]]; then
> >              for i in /sys/class/net/*/address; do
> >                  read net_mac < ${i}
> >                  if [[ "${bootif_mac}" == "${net_mac}" ]]; then
> >   
> 
> If bootit_mac becomes a new cmdline paramteter, please add to docs ;)
>
> Is not a bit redundant? User can set BOOTIF= at syslinux prompt. what is
> the advantage here?

Thinking about this... Just drop the patch.
It does not matter what format I give to BOOTIF. So I can use the pxelinux
version with hardware type prefix and mac address including dashes:

BOOTIF=01-88-99-aa-bb-cc-dd

Or give the mac address directly:

BOOTIF=88:99:aa:bb:cc:dd

Right? So I will adjust my boot parameters to always use BOOTIF=.
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-releng/attachments/20160527/5f5c9ac6/attachment-0001.asc>


More information about the arch-releng mailing list