rc.setup 1.84 KB
Newer Older
1 2
#!/bin/sh

3
#
4 5 6 7 8 9 10 11
#
# Inform TMCD that we've rebooted, and are starting testbed setup
#
if [ -x /etc/testbed/tmcc ]; then
        echo "Informing the testbed that we've rebooted ..."
	/etc/testbed/tmcc state REBOOTED
fi

12 13 14 15 16
if [ -x /etc/testbed/setup ]; then
        echo "Doing Testbed setup configuration ..."
        /etc/testbed/setup
fi

17 18 19 20 21
if [ -x /etc/testbed/setipod ]; then
	echo "Setting up IPOD ... "
        /etc/testbed/setipod
fi

22 23 24 25 26
if [ -x /etc/testbed/rc.tunnel ]; then
        echo "Setting up Testbed tunnels ..."
        /etc/testbed/rc.tunnel
fi

27 28 29 30 31
if [ -x /etc/testbed/rc.ifc ]; then
        echo "Setting up Testbed interfaces ..."
        /etc/testbed/rc.ifc
fi

32
# Note: no routing on delay nodes
33 34 35
if [ -x /etc/testbed/rc.delay ]; then
        echo "Setting up Testbed delay configuration ..."
        /etc/testbed/rc.delay
36
elif [ -x /etc/testbed/rc.route ]; then
37
        echo "Setting up Testbed interface routing ..."
38
	/etc/testbed/rc.route enable
39 40 41 42 43 44 45
fi

if [ -x /etc/testbed/rc.rpm  ]; then
        echo "Installing RPMs ..."
	/etc/testbed/rc.rpm
fi

46 47 48 49 50
if [ -x /etc/testbed/rc.tarballs  ]; then
        echo "Installing Tarballs ..."
	/etc/testbed/rc.tarballs
fi

51 52 53 54 55 56
if [ -x /etc/testbed/rc.healthd ]; then
	echo "Starting node health monitoring ..."
	/etc/testbed/rc.healthd start
fi

if [ -x /etc/testbed/slothd ]; then
57
	echo "Starting usage detector ..."
58
        killall slothd
59
        rm -f /var/run/slothd.pid
60 61 62
	/etc/testbed/slothd
fi

63 64
/bin/rm -f /var/at/jobs/S*
if [ -s /etc/testbed/startupcmd  ]; then
65
        echo "Scheduling startup command to run in a little bit ..."
66
	echo "/etc/testbed/runstartup" | at -q S 'now + 2 minutes'
67
fi
68

69 70 71 72
if [ -x /etc/testbed/rc.agents  ]; then
	/etc/testbed/rc.agents
fi

73
#
74
# Inform TMCD that we're up and running
75
#
76 77 78
if [ -x /etc/testbed/tmcc ]; then
        echo "Informing the testbed that we're up and running ..."
	/etc/testbed/tmcc state ISUP
79
fi