Commit be95550a authored by David Johnson's avatar David Johnson
Browse files

Update svc slicename.

parent 7941a2ee
#!/bin/sh
MAIL_WARNINGS_TO=testbed-ops@emulab.net
BASE=/home/utah_elab_svc/netbed_files
BASE=/home/utah_svc_slice/netbed_files
LOGDIR=$BASE/log
LOGFILE=$LOGDIR/thttpd.log
PIDFILE=$LOGDIR/thttpd.pid
......
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003 University of Utah and the Flux Group.
# Copyright (c) 2003-2007 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -64,22 +64,27 @@ if (!(($> == 0) || TBAdmin())) {
die "Sorry, only admins can use this script!\n";
}
my @nodes = ();
if (@ARGV) {
die "Usage: $0\n";
@nodes = @ARGV;
}
#
# Get a list of planetlab nodes that are up
#
my $query_result = DBQueryFatal("SELECT n.node_id FROM nodes as n " .
"LEFT JOIN node_status AS s ON n.node_id=s.node_id " .
"LEFT JOIN reserved AS r ON n.node_id = r.node_id " .
"WHERE n.type=\"pcplabphys\" AND s.status=\"up\" AND " .
"!(r.pid=\"" . NODEDEAD_PID .
"\" AND r.eid=\"" . NODEDEAD_EID . "\")");
my @nodes = ();
while (my ($node) = $query_result->fetchrow()) {
push @nodes, $node;
if (!scalar(@nodes)) {
#
# Get a list of planetlab nodes that are up
#
my $query_result =
DBQueryFatal("SELECT n.node_id FROM nodes as n " .
"LEFT JOIN node_status AS s ON n.node_id=s.node_id " .
"LEFT JOIN reserved AS r ON n.node_id = r.node_id " .
"WHERE n.type=\"pcplabphys\" AND s.status=\"up\" AND " .
"!(r.pid=\"" . NODEDEAD_PID .
"\" AND r.eid=\"" . NODEDEAD_EID . "\")");
@nodes = ();
while (my ($node) = $query_result->fetchrow()) {
push @nodes, $node;
}
}
#
......
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