Commit d6313952 authored by Mike Hibler's avatar Mike Hibler

Synch with other versions.

parent d7579349
#!/bin/sh
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -160,7 +161,7 @@ cnet_start()
ib[0-9]|mlxen*)
;;
# XXX skip Intel 10Gb for now; they require huge numbers of mbufs
ix[0-9])
ix[0-9]|ixl[0-9])
;;
ath*)
;;
......@@ -174,6 +175,24 @@ cnet_start()
esac
done
#
# XXX yow! If we don't come up with anything, we have to reconsider
# some of those interface types we skipped:
# ix because Clemson has an ix control network,
# mlxen because Utah (will have) x86 Moonshot cartridges
#
if [ -z "$_ifs" ]; then
for _if in $network_interfaces; do
case $_if in
ix[01]|mlxen[01])
_ifs="$_ifs $_if"
;;
*)
;;
esac
done
fi
#
# For the widearea case: decide if we want static or dynamic
# network configuration based on a config file.
......@@ -218,6 +237,13 @@ cnet_start()
WA_BOOTMETHOD="dhcp"
fi
#
# Let's always bring up lo0 first.
# Needed for the static configuration case (else clause).
# Also needed for newer dhclients which need some interface to bind to.
#
ifconfig lo0 inet 127.0.0.1 up
if [ "$WA_BOOTMETHOD" = "dhcp" ]; then
#
# use good ol' Emulab dhcp!
......@@ -254,10 +280,6 @@ cnet_start()
ifconfig "$cnetif" inet "$WA_IP_ADDR" netmask "$WA_IP_NETMASK" up
route add default "$WA_IP_GATEWAY"
# bring up lo0 too, since we neuter netif
ifconfig lo0 inet 127.0.0.1 up
route add 127.0.0.1 -interface lo0
# setup resolv.conf
echo "search $WA_DOMAIN" > /etc/resolv.conf
echo "nameserver $WA_IP_DNS1" >> /etc/resolv.conf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment