Commit 228d2aea authored by Leigh Stoller's avatar Leigh Stoller

Minor change to how testbed shutdown works; if I shutdown the testbed

with testbed-control, and then I reboot boss, I do not want the
daemons to start up until I call testbed-control again.
parent c8cbdf70
......@@ -51,6 +51,20 @@ stop)
;;
esac
#
# See if the testbed is "shutdown"; The variable has three values.
# 0 - Testbed is enabled.
# 1 - Testbed is disabled.
# -1 - Testbed is coming back online, so start up daemons.
#
if [ -x @prefix@/sbin/setsitevar ]; then
disabled=`@prefix@/sbin/setsitevar -c general/testbed_shutdown`
if [ $disabled -gt 0 ]; then
echo -n " mfrisbeed disabled"
exit 0
fi
fi
echo -n " mfrisbeed"
rm -f /var/run/frisbeed-*.pid
args="-C emulab -i @BOSSNODE_IP@"
......
......@@ -4,6 +4,19 @@
#
case "$1" in
start)
#
# See if the testbed is "shutdown"; The variable has three values.
# 0 - Testbed is enabled.
# 1 - Testbed is disabled.
# -1 - Testbed is coming back online, so start up daemons.
#
if [ -x @prefix@/sbin/setsitevar ]; then
disabled=`@prefix@/sbin/setsitevar -c general/testbed_shutdown`
if [ $disabled -gt 0 ]; then
echo -n " testbed disabled"
exit 0
fi
fi
if [ -x @prefix@/sbin/dbboot ]; then
# Delay a moment so that mysqld has started!
sleep 2
......
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2010-2011 University of Utah and the Flux Group.
# Copyright (c) 2010-2012 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
......@@ -89,6 +89,17 @@ sub Restart()
# Do not let the restart get interrupted. Bad.
$SIG{INT} = 'IGNORE';
#
# Need to to do this so the rc script knows it is okay to start.
# 0 - Testbed is enabled.
# 1 - Testbed is disabled.
# -1 - Testbed is coming back online, so start up daemons.
#
system("$SETSITEVAR general/testbed_shutdown -1");
if ($?) {
Fatal("Could not set general/testbed_shutdown to -1");
}
if ($stopped) {
print "Starting up testbed daemons.\n";
if (system("$MFRISBEED start") || system("$STARTUP start")) {
......
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