When netbooting, as soon as we've figured out which interface we booted
from, store its name in a kenv variable.
This commit is contained in:
parent
408a98eda0
commit
37881dde0f
@ -1773,6 +1773,8 @@ bootpc_init(void)
|
||||
|
||||
if (gctx->gotrootpath != 0) {
|
||||
|
||||
setenv("boot.netif.name", ifctx->ifp->if_xname);
|
||||
|
||||
error = md_mount(&nd->root_saddr, nd->root_hostnam,
|
||||
nd->root_fh, &nd->root_fhsize,
|
||||
&nd->root_args, td);
|
||||
|
@ -123,6 +123,7 @@ nfs_setup_diskless(void)
|
||||
printf("nfs_diskless: no interface\n");
|
||||
return; /* no matching interface */
|
||||
match_done:
|
||||
setenv("boot.netif.name", ifp->if_xname);
|
||||
strlcpy(nd->myif.ifra_name, ifp->if_xname, sizeof(nd->myif.ifra_name));
|
||||
|
||||
/* set up gateway */
|
||||
|
Loading…
x
Reference in New Issue
Block a user