FreeBSD Bugzilla – Attachment 85386 Details for
Bug 121566
[nfs] [request] [patch] ethernet iface should be brought up when booting from a mfs_root over nfs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
rc.initdiskless.patch
rc.initdiskless.patch (text/x-patch), 1.47 KB, created by
Robert Schulze
on 2008-03-25 10:54:38 UTC
(
hide
)
Description:
rc.initdiskless.patch
Filename:
MIME Type:
Creator:
Robert Schulze
Created:
2008-03-25 10:54:38 UTC
Size:
1.47 KB
patch
obsolete
>--- rc.initdiskless.dflt Tue Mar 25 11:49:22 2008 >+++ rc.initdiskless Tue Mar 25 11:25:09 2008 >@@ -163,6 +163,47 @@ > fi > } > >+# Fire up an interface to do nfs-mounts if this machine >+# was booted from a md_root >+# Use kenv to get the configuration vom dhcp like >+# /sys/nfsclient/nfs_vfsops.c does >+ >+ifconfig_kenv() >+{ >+IF=`kenv | grep 'boot.netif.name' | awk 'BEGIN {FS="="} {print $2}' | sed 's/"//g'` >+ >+# check if ifname is nonempty >+# >+if [ "x$IF" = "x" ]; then >+ return 0 >+fi >+ >+# check if interface is already up >+# >+ifcfg=`ifconfig ${IF} | grep -q inet` >+if [ $? -eq "0" ]; then >+ return 0 >+fi >+ >+GW=`kenv | grep 'boot.netif.gateway' | awk 'BEGIN {FS="="} {print $2}' | sed 's/"//g'` >+IP=`kenv | grep 'boot.netif.ip' | awk 'BEGIN {FS="="} {print $2}' | sed 's/"//g'` >+NM=`kenv | grep 'boot.netif.netmask' | awk 'BEGIN {FS="="} {print $2}' | sed 's/"//g'` >+ >+echo "configuring $IF from kenv: $IP netmask $NM gw $GW" >+ifconfig $IF $IP netmask $NM up >+route add default $GW >+ >+# setting nfsroot to accomplish relative paths >+# in diskless_remount >+ >+nfsroot=`kenv | grep 'boot.nfsroot.path' | awk 'BEGIN {FS="="} {print $2}' | sed 's/"//g'` >+nfsserver=`kenv | grep 'boot.nfsroot.server' | awk 'BEGIN {FS="="} {print $2}' | sed 's/"//g'` >+ >+nfsroot="$nfsserver:$nfsroot" >+ >+ >+} >+ > # DEBUGGING > # > # set -v >@@ -175,6 +216,8 @@ > class="" > if [ ${dlv:=0} -ne 0 ] ; then > iflist=`ifconfig -l` >+ ifconfig_kenv >+ > for i in ${iflist} ; do > set -- `ifconfig ${i}` > while [ $# -ge 1 ] ; do
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 121566
:
85385
| 85386