diff options
author | Toomas Soome <tsoome@me.com> | 2018-09-13 11:29:25 +0300 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2018-09-18 17:05:26 +0000 |
commit | 837327673cfef3fa0e815ea9377af002d7b1e01b (patch) | |
tree | a3fdd031f9587d89826ea1f8f8d3a630a821dba2 | |
parent | cbb9248e66a77c6382c6f48aebae5fd0ee60fa69 (diff) | |
download | illumos-joyent-837327673cfef3fa0e815ea9377af002d7b1e01b.tar.gz |
9839 unix: add translation for netboot properties
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Approved by: Robert Mustacchi <rm@joyent.com>
-rw-r--r-- | usr/src/uts/i86pc/os/fakebop.c | 36 |
1 files changed, 36 insertions, 0 deletions
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; |