From 20b4f55603ffc2c31d30760f86595cf46b75c40b Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 21 Aug 2012 14:23:52 +0200 Subject: [PATCH] 9bootpxe: try /cfg/pxe/default if /cfg/pxe/$ether fails before breaking to the prompt. --- sys/man/8/9boot | 4 +++- sys/src/boot/pc/pxe.c | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/man/8/9boot b/sys/man/8/9boot index bf1f204ed..90ef87a8c 100644 --- a/sys/man/8/9boot +++ b/sys/man/8/9boot @@ -83,10 +83,12 @@ for details). Once started, .IR 9bootpxe will read the file .B /cfg/pxe/$ether +or, if this file is not present, +.B /cfg/pxe/default from the tftp server, where .B $ether is the MAC address of the client's network card -in lower case hex, and use this as its +in lower case hex, and uses this as its .IR plan9.ini (8) file. .SH FILES diff --git a/sys/src/boot/pc/pxe.c b/sys/src/boot/pc/pxe.c index a950b2579..97ee259cb 100644 --- a/sys/src/boot/pc/pxe.c +++ b/sys/src/boot/pc/pxe.c @@ -340,10 +340,11 @@ start(void *) } memmove(path, "/cfg/pxe/", 9); memmove(path+9, mac, 13); - if(tftpopen(f = &t, path, yip, sip, gip)){ - print("no config\r\n"); - f = 0; - } + if(tftpopen(f = &t, path, yip, sip, gip)) + if(tftpopen(f, "/cfg/pxe/default", yip, sip, gip)){ + print("no config\r\n"); + f = 0; + } for(;;){ kern = configure(f, path); f = 0; if(tftpopen(&t, kern, yip, sip, gip)){