From 837327673cfef3fa0e815ea9377af002d7b1e01b Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Thu, 13 Sep 2018 11:29:25 +0300 Subject: 9839 unix: add translation for netboot properties Reviewed by: Peter Tribble Reviewed by: Andy Fiddaman Approved by: Robert Mustacchi --- usr/src/uts/i86pc/os/fakebop.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/usr/src/uts/i86pc/os/fakebop.c b/usr/src/uts/i86pc/os/fakebop.c index ff5e4ea7a4..f381504e39 100644 --- a/usr/src/uts/i86pc/os/fakebop.c +++ b/usr/src/uts/i86pc/os/fakebop.c @@ -1314,6 +1314,42 @@ process_boot_environment(struct boot_modules *benv) if (do_bsys_getproplen(NULL, name) >= 0) continue; + /* Translate netboot variables */ + if (strcmp(name, "boot.netif.gateway") == 0) { + bsetprops(BP_ROUTER_IP, value); + continue; + } + if (strcmp(name, "boot.netif.hwaddr") == 0) { + bsetprops(BP_BOOT_MAC, value); + continue; + } + if (strcmp(name, "boot.netif.ip") == 0) { + bsetprops(BP_HOST_IP, value); + continue; + } + if (strcmp(name, "boot.netif.netmask") == 0) { + bsetprops(BP_SUBNET_MASK, value); + continue; + } + if (strcmp(name, "boot.netif.server") == 0) { + bsetprops(BP_SERVER_IP, value); + continue; + } + if (strcmp(name, "boot.netif.server") == 0) { + if (do_bsys_getproplen(NULL, BP_SERVER_IP) < 0) + bsetprops(BP_SERVER_IP, value); + continue; + } + if (strcmp(name, "boot.nfsroot.server") == 0) { + if (do_bsys_getproplen(NULL, BP_SERVER_IP) < 0) + bsetprops(BP_SERVER_IP, value); + continue; + } + if (strcmp(name, "boot.nfsroot.path") == 0) { + bsetprops(BP_SERVER_PATH, value); + continue; + } + if (name_is_blacklisted(name) == B_TRUE) continue; -- cgit v1.2.3