diff options
author | des <des@FreeBSD.org> | 2005-04-26 20:45:29 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2005-04-26 20:45:29 +0000 |
commit | 37881dde0fe6bcaa4db9457ef4ea5c655bc6d708 (patch) | |
tree | 21668b35ed6cd5e576ecc9693ca0b16cd2363e26 /sys/nfsclient | |
parent | 408a98eda0a10cadb704be572ff6ebad25db3ddc (diff) | |
download | FreeBSD-src-37881dde0fe6bcaa4db9457ef4ea5c655bc6d708.zip FreeBSD-src-37881dde0fe6bcaa4db9457ef4ea5c655bc6d708.tar.gz |
When netbooting, as soon as we've figured out which interface we booted
from, store its name in a kenv variable.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/bootp_subr.c | 2 | ||||
-rw-r--r-- | sys/nfsclient/nfs_diskless.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c index 237b722..82aa281 100644 --- a/sys/nfsclient/bootp_subr.c +++ b/sys/nfsclient/bootp_subr.c @@ -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); diff --git a/sys/nfsclient/nfs_diskless.c b/sys/nfsclient/nfs_diskless.c index fb21b7e..2eae2ce 100644 --- a/sys/nfsclient/nfs_diskless.c +++ b/sys/nfsclient/nfs_diskless.c @@ -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 */ |