ref: 20b4f55603ffc2c31d30760f86595cf46b75c40b
parent: be0301f45850ca70db0f2ec8258e73615a0ec7be
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Tue Aug 21 10:23:52 EDT 2012
9bootpxe: try /cfg/pxe/default if /cfg/pxe/$ether fails before breaking to the prompt.
--- a/sys/man/8/9boot
+++ b/sys/man/8/9boot
@@ -83,10 +83,12 @@
.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
--- a/sys/src/boot/pc/pxe.c
+++ b/sys/src/boot/pc/pxe.c
@@ -340,10 +340,11 @@
}
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)){--
⑨