Skip to content
Browse files

Enable starting networking on install media

  • Loading branch information...
1 parent d277133 commit 426025b981fe372fcf16b2af29c67d976becd692 @kmoore134 kmoore134 committed Aug 14, 2013
Showing with 11 additions and 12 deletions.
  1. +11 −0 overlays/install-overlay/root/PCBSDStart.sh
  2. +0 −12 overlays/install-overlay/root/PCBSDStartLive.sh
View
11 overlays/install-overlay/root/PCBSDStart.sh
@@ -38,6 +38,17 @@ fi
# Enable the debug version of pc-sysinstall
/root/debugpcsysinstall.sh
+# Set all NICS to DHCP
+NICS=`ifconfig -l`
+for i in $NICS
+do
+ ifconfig ${i} | grep -q "status: active"
+ if [ $? -eq 0 ] ; then
+ echo "Enabling networking on ${i}..."
+ (dhclient ${i} >/dev/null 2>/dev/null ) &
+ fi
+done
+
# Check if we are booting in LIVE or INSTALL mode
if [ -e "/usr/pcbsd-live" ]; then
View
12 overlays/install-overlay/root/PCBSDStartLive.sh
@@ -40,18 +40,6 @@ numlockx off
/usr/local/bin/${dCmd}" >/root/.xinitrc
-# Set all NICS to DHCP
-echo "Detecting NICs..."
-NICS=`ifconfig -l`
-for i in $NICS
-do
- if [ "$i" != "lo0" -a "$i" != "fxp0" -a "$i" != "pfsync0" -a "$i" != "pflog0" ]
- then
- (dhclient ${i} >/dev/null 2>/dev/null ) &
- fi
-done
-
-
# Now run the X auto-detection
detect_x

0 comments on commit 426025b

Please sign in to comment.
Something went wrong with that request. Please try again.