Commit 561bfa6b authored by Robert Ricci's avatar Robert Ricci

Some changes to our system of finding control interface on bootup. Rather

than having node types in interface-specific configuration scripts, they
use control_interface so that this information is only stored in one
place.

Also added ifcfg-eth{1,3} scripts which are not used now, but make it easier
to handle differing control interfaces in the future.
parent 4c186189
#!/bin/sh
# This interface should only DHCP if this node is a pc850
if [ `/etc/testbed/nodetype` = 'pc850' ]; then
if [ `/etc/testbed/control_interface` = 'fxp0' ]; then
dhcp_interfaces="$dhcp_interfaces fxp0";
fi
#!/bin/sh
# This interface should only DHCP if this node is a pc600
if [ `/etc/testbed/nodetype` = 'pc600' ]; then
if [ `/etc/testbed/control_interface` = 'fxp4' ]; then
dhcp_interfaces="$dhcp_interfaces fxp4";
fi
#!/bin/sh
# This interface should only DHCP if this node is a pc1500
if [ `/etc/testbed/nodetype` = 'pc1500' ]; then
if [ `/etc/testbed/control_interface` = 'xl0' ]; then
dhcp_interfaces="$dhcp_interfaces xl0";
fi
......@@ -60,6 +60,8 @@ script-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/nodetype $(INSTALL_DIR)/nodetype
$(INSTALL) -m 755 $(SRCDIR)/control_interface $(INSTALL_DIR)/control_interface
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth1
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth2 /etc/sysconfig/network-scripts/ifcfg-eth2
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth3 /etc/sysconfig/network-scripts/ifcfg-eth3
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth4 /etc/sysconfig/network-scripts/ifcfg-eth4
......@@ -7,5 +7,5 @@ if [ "$NODETYPE" = 'pc600' ]; then
elif [ "$NODETYPE" = 'pc850' ]; then
echo 'eth2'
elif [ "$NODETYPE" = 'pc1500' ]; then
echo 'eth0'
echo 'eth4'
fi
DEVICE="eth0"
if [ "`/etc/rc.d/testbed/nodetype`" = 'pc1500' ]; then
if [ "`/etc/rc.d/testbed/control_interface`" = "$DEVICE" ]; then
ONBOOT="yes"
BOOTPROTO="dhcp"
else
......
DEVICE="eth1"
if [ "`/etc/rc.d/testbed/control_interface`" = "$DEVICE" ]; then
ONBOOT="yes"
BOOTPROTO="dhcp"
else
ONBOOT="no"
fi
IPADDR=""
NETMASK=""
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"
DEVICE="eth2"
if [ "`/etc/rc.d/testbed/nodetype`" = 'pc850' ]; then
if [ "`/etc/rc.d/testbed/control_interface`" = "$DEVICE" ]; then
ONBOOT="yes"
BOOTPROTO="dhcp"
else
......
DEVICE="eth3"
if [ "`/etc/rc.d/testbed/control_interface`" = "$DEVICE" ]; then
ONBOOT="yes"
BOOTPROTO="dhcp"
else
ONBOOT="no"
fi
IPADDR=""
NETMASK=""
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"
DEVICE="eth4"
if [ "`/etc/rc.d/testbed/nodetype`" = 'pc600' ]; then
if [ "`/etc/rc.d/testbed/control_interface`" = "$DEVICE" ]; then
ONBOOT="yes"
BOOTPROTO="dhcp"
else
......
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