Commit ff2335dd authored by Mike Hibler's avatar Mike Hibler

1. Better control net detection.

   No longer rely on looking at kernel boot time messages and extracting
   a hardware signature to determine the nodetype to then determine the
   control net.  Now we just DHCP on all interfaces and decree that the
   interface that answers is our control net interface.

   An extraordinary number of sleezy tricks were needed to get FBSD4,
   FBSD5, and RHL to DHCP on all interfaces without changing any standard
   scripts.

   For now, the nodetype/cpuspeed/chipset scripts still exist for the
   benefit of healthd, which uses the output of nodetype to determine
   what kernel module to load.  We should fix this.

   Side-effect: pump, the old RHL DHCP client, is history!  For older
   RHL releases, you will need a version of dhclient.

   Side-effect: in Linux, all non-control net interfaces are left up
   but without a legit IP address.  This is a consequence of dhclient.
   In FBSD, it was trivial to clean this up, RHL will take a little
   more work.  Up or down, it shouldn't matter.

2. Add an mfs-install make target, a scaled-down version of the client
   install.  Added a mandatory DESTDIR check so you don't accidentally
   install in the wrong place on boss.
parent 9371ad97
......@@ -93,6 +93,11 @@ install: $(INSTALL_SBINDIR)/tmcd \
client-install: client
@$(MAKE) -C $(MDSUBDIR) install
mfs: client
mfs-install: mfs
@$(MAKE) -C $(MDSUBDIR) mfs-install
$(INSTALL_BINDIR)/tmcd/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_BINDIR)/tmcd
......
......@@ -41,19 +41,21 @@ INSTALL = /usr/bin/install -c
injail: $(SRCDIR)/jail/injail.c
$(CC) $(CFLAGS) -O2 -o injail $<
destdircheck:
@if [ -z "$(DESTDIR)" ]; then \
echo "You must define DESTDIR for this target!"; \
false; \
fi
install client-install: common-install etc-install \
sup-install script-install bin-install jail-install
@echo "Remember to install the PEM files if necessary"
mfs-install: common-install etc-install \
mfs-install: destdircheck common-install etc-install \
script-install bin-install
cp $(SRCDIR)/mfs-rc.conf $(SYSETCDIR)/rc.conf
echo >$(ISMFS) "This file indicates its the MFS. DO NOT DELETE!"
destdircheck:
@if [ -z "$(DESTDIR)" ]; then \
echo "You must define DESTDIR for this target!"; \
false; \
@if [ ! -f $(ISMFS) ]; then \
echo >$(ISMFS) "This file indicates its the MFS. DO NOT DELETE!"; \
fi
cdboot-install: destdircheck common-install etc-install \
......@@ -133,11 +135,6 @@ sysetc-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/rc.conf $(SYSETCDIR)/rc.conf
$(INSTALL) -m 755 $(SRCDIR)/dhclient-exit-hooks \
$(SYSETCDIR)/dhclient-exit-hooks
$(INSTALL) -m 755 $(SRCDIR)/start_if.fxp0 $(SYSETCDIR)/start_if.fxp0
$(INSTALL) -m 755 $(SRCDIR)/start_if.fxp1 $(SYSETCDIR)/start_if.fxp1
$(INSTALL) -m 755 $(SRCDIR)/start_if.fxp4 $(SYSETCDIR)/start_if.fxp4
$(INSTALL) -m 755 $(SRCDIR)/start_if.xl0 $(SYSETCDIR)/start_if.xl0
$(INSTALL) -m 755 $(SRCDIR)/start_if.em0 $(SYSETCDIR)/start_if.em0
$(INSTALL) -m 755 $(SRCDIR)/periodic.conf $(SYSETCDIR)/periodic.conf
$(INSTALL) -m 755 $(SRCDIR)/testbed.sh $(RCDIR)/testbed.sh
$(INSTALL) -m 755 $(SRCDIR)/elvind.sh $(RCDIR)/elvind.sh
......@@ -152,14 +149,14 @@ script-install: dir-install $(SCRIPTS)
$(INSTALL) -m 755 $(SRCDIR)/rc.kname $(BINDIR)/rc/rc.kname
$(INSTALL) -m 755 $(SRCDIR)/rc.mfs $(BINDIR)/rc/rc.mfs
$(INSTALL) -m 755 ./sethostname $(BINDIR)/sethostname
$(INSTALL) -m 755 $(SRCDIR)/dhclient $(BINDIR)/dhclient
$(INSTALL) -m 755 $(SRCDIR)/nodetype $(BINDIR)/nodetype
$(INSTALL) -m 755 $(SRCDIR)/chipset.awk $(BINDIR)/chipset.awk
$(INSTALL) -m 755 $(SRCDIR)/cpuspeed.awk $(BINDIR)/cpuspeed.awk
$(INSTALL) -m 755 $(SRCDIR)/tbshutdown $(BINDIR)/tbshutdown
$(INSTALL) -m 755 $(SRCDIR)/delaysetup $(BINDIR)/delaysetup
$(INSTALL) -m 755 $(SRCDIR)/mkextrafs.pl $(BINDIR)/mkextrafs.pl
$(INSTALL) -m 755 $(SRCDIR)/control_interface \
$(BINDIR)/control_interface
$(INSTALL) -m 755 $(SRCDIR)/control_interface $(BINDIR)/control_interface
sfs-install:
$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/etc/sfs
......
......@@ -7,31 +7,8 @@
. /etc/emulab/paths.sh
if [ -r $BOOTDIR/control_interface ]; then
cat $BOOTDIR/control_interface
if [ -r $BOOTDIR/controlif ]; then
cat $BOOTDIR/controlif
else
NODETYPE=`$BINDIR/nodetype`
case $NODETYPE in
pc300|pc733|pc850|i2|pc1800)
echo 'fxp0'
;;
pcL440GX)
echo 'fxp1'
;;
pc600|pc850a)
echo 'fxp4'
;;
pc1500|pc2000)
echo 'xl0'
;;
pc3000|pc2400-aero)
echo 'em0'
;;
pc2400-orbit)
echo 'fxp0'
;;
*)
echo 'unknown'
;;
esac
echo 'unknown'
fi
#!/bin/sh
#
# Ignore interfaces passed in and just dhcp on all of them.
# Since we are invoked by telling rc.conf to DHCP on lo0, we must
# also correctly reset lo0's state.
#
ifconfig lo0 down
ifconfig lo0 inet 127.0.0.1
/sbin/dhclient $flags
exit $?
......@@ -20,7 +20,7 @@ echo $new_routers > $BOOTDIR/routerip
echo $new_ip_address > $BOOTDIR/myip
echo $new_subnet_mask > $BOOTDIR/mynetmask
if [ -n "$interface" ]; then
echo $interface > $BOOTDIR/control_interface
echo $interface > $BOOTDIR/controlif
fi
#
......
......@@ -9,6 +9,16 @@ blanktime="NO"
update_motd="NO"
ntpdate_enable="YES"
ntpdate_flags="boss.emulab.net"
ntpdate_flags="boss"
nfs_client_enable="YES"
#
# Tricks to for DHCP on all interfaces.
# Specify a DHCP for lo0 to force rc.network to call the
# dhcp_program. That program is a script of ours which invokes the
# real dhclient with all interfaces (no args) and properly configure lo0.
#
network_interfaces="lo0"
ifconfig_lo0="DHCP"
dhcp_program="/usr/local/etc/emulab/dhclient"
......@@ -208,3 +208,4 @@ foreach my $file (@DEADFILES) {
warn("*** could not remove $BINDIR/$file\n");
}
}
system("rm -f /etc/start_if*");
# -- sysinstall generated deltas -- #
# Created: Wed Jun 13 16:59:03 2001
# Enable network daemons for user convenience.
# This file now contains just the overrides from /etc/defaults/rc.conf
# please make all changes to this file.
......@@ -10,9 +7,9 @@ sshd_enable="YES"
nfs_client_flags="-n 8"
# For SFS/Jails
portmap_enable="YES"
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 8"
nfs_bufpackets="24"
xntpd_enable="YES"
xntpd_program="/usr/local/etc/emulab/ntpstart"
......@@ -22,3 +19,13 @@ ntpdate_flags="boss"
# no displays
blanktime="NO"
#
# Tricks to for DHCP on all interfaces.
# Specify a DHCP for lo0 to force rc.network to call the
# dhcp_program. That program is a script of ours which invokes the
# real dhclient with all interfaces (no args) and properly configure lo0.
#
network_interfaces="lo0"
ifconfig_lo0="DHCP"
dhcp_program="/usr/local/etc/emulab/dhclient"
#!/bin/sh
. /etc/emulab/paths.sh
if [ `$BINDIR/control_interface` = 'em0' ]; then
dhcp_interfaces="$dhcp_interfaces em0";
fi
#!/bin/sh
. /etc/emulab/paths.sh
if [ `$BINDIR/control_interface` = 'fxp0' ]; then
dhcp_interfaces="$dhcp_interfaces fxp0";
fi
#!/bin/sh
. /etc/emulab/paths.sh
if [ `$BINDIR/control_interface` = 'fxp1' ]; then
dhcp_interfaces="$dhcp_interfaces fxp1";
fi
#!/bin/sh
. /etc/emulab/paths.sh
if [ `$BINDIR/control_interface` = 'fxp4' ]; then
dhcp_interfaces="$dhcp_interfaces fxp4";
fi
#!/bin/sh
. /etc/emulab/paths.sh
if [ `$BINDIR/control_interface` = 'xl0' ]; then
dhcp_interfaces="$dhcp_interfaces xl0";
fi
......@@ -24,7 +24,7 @@ SCRIPTS = sethostname sethostname.dhclient
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: pump.conf supfile $(SCRIPTS)
all: supfile $(SCRIPTS)
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -85,21 +85,12 @@ etc-install: dir-install sysetc-remove sysetc-install
$(INSTALL) -m 600 $(SRCDIR)/gshadow $(ETCDIR)/gshadow
$(INSTALL) -m 644 $(SRCDIR)/hosts $(ETCDIR)/hosts
sysetc-install: dir-install pump.conf
$(INSTALL) -m 644 ./pump.conf $(SYSETCDIR)/pump.conf
sysetc-install: dir-install ifcfgs
$(INSTALL) -m 755 $(SRCDIR)/dhclient-enter-hooks $(SYSETCDIR)/dhclient-enter-hooks
$(INSTALL) -m 755 $(SRCDIR)/dhclient-exit-hooks $(SYSETCDIR)/dhclient-exit-hooks
$(INSTALL) -m 644 $(SRCDIR)/modules.conf $(SYSETCDIR)/modules.conf
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth0 \
$(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth0
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth1 \
$(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth1
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth2 \
$(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth2
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth3 \
$(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth3
$(INSTALL) -m 755 $(SRCDIR)/ifcfg-eth4 \
$(SYSETCDIR)/sysconfig/network-scripts/ifcfg-eth4
$(INSTALL) -m 644 $(SRCDIR)/ifcfg-eth99 $(SYSETCDIR)/sysconfig/network-scripts
$(INSTALL) -m 644 ifcfg-eth[0-9]* $(SYSETCDIR)/sysconfig/network-scripts
$(INSTALL) -m 755 $(SRCDIR)/ntpd.sh $(RCDIR)/init.d/ntpd
$(INSTALL) -m 755 $(SRCDIR)/testbed $(RCDIR)/init.d/testbed
-ln -sf $(RCDIR)/init.d/testbed $(RCDIR)/rc3.d/S96testbed
......@@ -126,22 +117,19 @@ sysetc-remove:
script-install: dir-install $(SCRIPTS)
$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm
$(INSTALL) -m 755 $(SRCDIR)/rc.linux $(BINDIR)/rc/rc.linux
$(INSTALL) -m 755 $(SRCDIR)/rc.ipod $(BINDIR)/rc/rc.ipod
$(INSTALL) -m 755 $(SRCDIR)/prepare $(BINDIR)/prepare
$(INSTALL) -m 755 $(SRCDIR)/ixpboot $(BINDIR)/ixpboot
$(INSTALL) -m 755 $(SRCDIR)/rc.ixp $(BINDIR)/rc/rc.ixp
$(INSTALL) -m 755 ./sethostname $(BINDIR)/sethostname
$(INSTALL) -m 755 ./sethostname.dhclient $(BINDIR)/sethostname.dhclient
$(INSTALL) -m 755 $(SRCDIR)/rc.healthd $(BINDIR)/rc/rc.healthd
$(INSTALL) -m 755 $(SRCDIR)/healthd.conf $(BINDIR)/healthd.conf
$(INSTALL) -m 755 $(SRCDIR)/chipset.awk $(BINDIR)/chipset.awk
$(INSTALL) -m 755 $(SRCDIR)/cpuspeed.awk $(BINDIR)/cpuspeed.awk
$(INSTALL) -m 755 $(SRCDIR)/delaysetup $(BINDIR)/delaysetup
$(INSTALL) -m 755 $(SRCDIR)/nodetype $(BINDIR)/nodetype
$(INSTALL) -m 755 $(SRCDIR)/mkextrafs.pl $(BINDIR)/mkextrafs.pl
$(INSTALL) -m 755 $(SRCDIR)/control_interface \
$(BINDIR)/control_interface
$(INSTALL) -m 755 $(SRCDIR)/control_interface $(BINDIR)/control_interface
$(INSTALL) -m 755 $(SRCDIR)/nodetype $(BINDIR)/nodetype
$(INSTALL) -m 755 $(SRCDIR)/chipset.awk $(BINDIR)/chipset.awk
$(INSTALL) -m 755 $(SRCDIR)/cpuspeed.awk $(BINDIR)/cpuspeed.awk
sfs-install:
$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/etc/sfs
......@@ -155,3 +143,7 @@ sfs-install:
$(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/root
$(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/var
$(INSTALL) -m 775 -o sfs -g sfs -d $(DESTDIR)/var/sfs/usr
# create ifcfg-eth? files
ifcfgs: $(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template
$(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template
......@@ -7,25 +7,8 @@
. /etc/emulab/paths.sh
if [ -r $BOOTDIR/control_interface ]; then
cat $BOOTDIR/control_interface
if [ -r $BOOTDIR/controlif ]; then
cat $BOOTDIR/controlif
else
NODETYPE=`$BINDIR/nodetype`
case $NODETYPE in
pc300|pc1500|pc2000|pc3000|pc2400-orbit|pc733|pcL440GX)
echo 'eth0'
;;
i2|pc2400-aero)
echo 'eth1'
;;
pc850)
echo 'eth2'
;;
pc600|pc850a)
echo 'eth4'
;;
*)
echo 'unknown'
;;
esac
echo 'unknown'
fi
......@@ -25,7 +25,7 @@ if [ x$reason = xREBOOT ] || [ x$reason = xBOUND ] || \
echo $new_ip_address > $BOOTDIR/myip
echo $new_subnet_mask > $BOOTDIR/mynetmask
if [ -n "$interface" ]; then
echo $interface > $BOOTDIR/control_interface
echo $interface > $BOOTDIR/controlif
fi
#
......
DEVICE="eth1"
. /etc/emulab/paths.sh
if [ "`control_interface`" = "$DEVICE" ]; then
BOOTPROTO="dhcp"
ONBOOT="yes"
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"
. /etc/emulab/paths.sh
if [ "`control_interface`" = "$DEVICE" ]; then
BOOTPROTO="dhcp"
ONBOOT="yes"
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="eth3"
. /etc/emulab/paths.sh
if [ "`control_interface`" = "$DEVICE" ]; then
BOOTPROTO="dhcp"
ONBOOT="yes"
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"
. /etc/emulab/paths.sh
if [ "`control_interface`" = "$DEVICE" ]; then
BOOTPROTO="dhcp"
ONBOOT="yes"
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"
#
# HACK: run dhclient on all interfaces, and do nothing else
#
# Note that this file's name (eth99) cannot overlap with an actual
# existing interface or dhclient will loop. dhclient-script invokes
# the source-config function which sources the ifcfg-ethN file. Thus
# if this script were called "ifcfg-eth0" and eth0 was the DHCPable
# interface, we would wind up recursively invoking dhclient (trust me,
# I tried it :-)
#
DEVICE="eth99"
IFACETYPES="3c59x eepro100 e1000 tulip"
#
# First, probe for all our supported ethernet types
#
modprobe -qa $IFACETYPES
#
# If dhclient returns success, then it has configured the first interface
# and gone into background mode. At that point we don't care about it any
# more and just kill it. We also set ONBOOT=no to prevent ifup (our caller)
# from doing any further configuration on this fake interface.
#
if [ -x /sbin/dhclient ] && /sbin/dhclient -q ; then
killall dhclient
ONBOOT="no"
else
# eat flaming death
exit 1
fi
DEVICE="eth0"
. /etc/emulab/paths.sh
if [ "`control_interface`" = "$DEVICE" ]; then
BOOTPROTO="dhcp"
ONBOOT="yes"
else
ONBOOT="no"
fi
IPADDR=""
NETMASK=""
IPXNETNUM_802_2=""
......
#!/bin/sh
#
# Create some ifcfg-eth files based on a template
#
if [ $# != 1 ]; then
echo "usage: $0 template-file"
exit 1
fi
for netif in 0 1 2 3 4 5 6 7 8 9; do
cat > ifcfg-eth${netif} <<FOO
#
# Auto-generated by $0.
# You know the drill: DO NOT EDIT, blah, blah, blah...
#
# ifcfg_eth99 is where the Emulab control net setup takes place,
# it invokes dhclient on all interfaces. However, dhclient-script
# expects to find an ifcfg_ethN file for each interface it wants to
# probe. So we put a stub here that does nothing (courtesy of ONBOOT=no).
#
DEVICE="eth${netif}"
ONBOOT="no"
FOO
cat $1 >> ifcfg-eth${netif}
done
define NT `/usr/local/etc/emulab/nodetype`
if $NT == "pc2000"
alias eth0 3c59x
alias eth1 e1000
alias eth2 e1000
alias eth3 e1000
alias eth4 e1000
elseif $NT == "pc1500"
alias eth0 3c59x
alias eth1 tulip
alias eth2 tulip
alias eth3 tulip
alias eth4 tulip
elseif $NT == "pc850"
alias eth0 eepro100
alias eth1 eepro100
alias eth2 eepro100
alias eth3 eepro100
alias eth4 eepro100
elseif $NT == "pc600"
alias ath0 ath_pci
alias eth0 eepro100
alias eth1 eepro100
alias eth2 eepro100
alias eth3 eepro100
alias eth4 eepro100
elseif $NT == "pcL440GX"
alias ath0 ath_pci
alias eth0 eepro100
alias eth1 eepro100
alias eth2 eepro100
elseif $NT == "pc300"
alias eth0 eepro100
alias eth1 eepro100
alias eth2 eepro100
alias eth3 eepro100
alias eth4 3c59x
elseif $NT == "i2"
alias eth0 e1000
alias eth1 eepro100
elseif $NT == "pc2400-orbit"
alias eth0 eepro100
alias eth1 e1000
elseif $NT == "pc2400-aero"
alias eth0 e1000
alias eth1 e1000
alias eth2 e1000
alias eth3 e1000
alias eth4 e1000
alias eth5 e1000
elseif $NT == "pc733"
alias eth0 eepro100
alias eth1 e1000
alias eth2 e1000
alias eth3 e1000
alias eth4 e1000
else
alias eth0 feth0
alias eth1 feth1
alias eth2 feth2
alias eth3 feth3
alias eth4 feth4
probe feth0 eepro100 3c59x e1000
probe feth1 eepro100 e1000 tulip
probe feth2 eepro100 e1000 tulip
probe feth3 eepro100 e1000 tulip
probe feth4 eepro100 e1000 tulip
endif
alias char-major-10-200 tun
......@@ -24,6 +24,19 @@ my $SFSUSERS = "/etc/sfs/sfs_users";
my $SFSHOSTKEY = "/etc/sfs/sfs_host_key";
my $VARACCTDIR = "/var/account";
#
# Dead wood in $BINDIR
# If you remove/move a script, list it here so that it goes away when the
# image is remade.
#
my @DEADFILES = ("rc.agents", "rc.delayagent", "rc.delta", "rc.healthd",
"rc.injail", "rc.ipod", "rc.mfs", "rc.progagent",
"rc.setup", "rc.slothd", "rc.testbed",
"batchcmddone", "bootsetup", "install-tarfile",
"jailsetup", "update_delays", "rc/rc.linux",
"sethostname" # replaced by sethostname.dhclient on linux
);
# Drag in path stuff so we can find emulab stuff.
BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
......@@ -184,6 +197,15 @@ foreach my $dir (@VARDIRS) {
}
}
print "Clearing out old Emulab scripts and binaries in $BINDIR ...\n";
foreach my $file (@DEADFILES) {
if (-f "$BINDIR/$file") {
unlink("$BINDIR/$file") or
warn("*** could not remove $BINDIR/$file\n");
}
}
system("rm -f /etc/pump.conf");
print "Removing backup files in /etc\n";
opendir(ETC,"/etc") or
......
script @CLIENT_BINDIR@/sethostname
#/bin/sh -
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002, 2004 University of Utah and the Flux Group.
# All rights reserved.
#
. /etc/emulab/paths.sh
#
# Probe all of the network interfaces to make sure they are brought online.
# This is absurd. I use the support function located in the network-functions
# sh script.
#
. /etc/sysconfig/network-scripts/network-functions
#
# Probe a bunch of ethX devices. We setup /etc/modules.conf so that all
# network cards are so named. is_available will not do anything if the
# device type is already probed, or if no such device type exists.
#
echo "Probing a bunch of ethX devices ..."
is_available eth0
is_available eth1
is_available eth2
is_available eth3
is_available eth4
is_available eth5
is_available eth6
is_available ath0
exit 0
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
#
# Configure variables
#
my $USEPNAME = "@DISABLE_NAMED_SETUP@";
#
# Set the hostname for the node according to the current experiment.
#
# In Linux, this gets invoked directly from the "pump" configuration
# program. See /etc/pump.conf. Who came up that name? Anyway, the
# first argument to the script is a token, one of up, renewal, or
# release. We set the hostname on either of the first two.
#
# If no args supplied at all (which means being run by hand, then do it).
#
# We don't need to worry about the domainname on Linux. Its set via a
# different mechanism, so changing the hostname will not effect the
# domain suffix.
#
# Drag in path stuff so we can find emulab stuff.
BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
# Turn off line buffering on output
$| = 1;
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use libsetup;
use libtmcc;
my ($action,$iface,$ip) = @ARGV;
open(STDERR, ">$LOGDIR/pump.log");
if (defined($action)) {
if ($action ne "up" && $action ne "renewal") {
exit 0;
}
}
#
# If testbed is not maintaining DNS aliases, we had better not
# use the nickname for the hostname as it will not resolve.
#
my $nickname;
if ($USEPNAME) {