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:
Dag-Erling Smørgrav 2005-04-26 20:45:29 +00:00
parent 1ec622fdd6
commit 8f0aecc01f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145570
2 changed files with 3 additions and 0 deletions

View File

@ -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);

View File

@ -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 */