Commit c6a9bda3 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Startup up rusaged in the service slice, which is currently hardwired

to utah_elab_svc (slice that Jay created). We determine this by the
rather low tech approach of looking at $USER in the environment!
parent a0c1b88a
...@@ -32,6 +32,11 @@ if [ -x $BINDIR/watchdog ]; then ...@@ -32,6 +32,11 @@ if [ -x $BINDIR/watchdog ]; then
$BINDIR/watchdog start $BINDIR/watchdog start
fi fi
if [ -x $BINDIR/rusaged ]; then
echo "Starting rusage daemon ..."
$BINDIR/rusaged start
fi
echo "Informing the testbed that we're up and running ..." echo "Informing the testbed that we're up and running ..."
# XXX Oogly # XXX Oogly
$BINDIR/tmcc -n `cat /var/emulab/boot/plabname` state ISUP $BINDIR/tmcc -n `cat /var/emulab/boot/plabname` state ISUP
......
...@@ -40,6 +40,7 @@ my $logname = "$LOGDIR/rusaged.debug"; ...@@ -40,6 +40,7 @@ my $logname = "$LOGDIR/rusaged.debug";
my $pidfile = "/var/run/emulab-rusaged.pid"; my $pidfile = "/var/run/emulab-rusaged.pid";
my $debug = 0; my $debug = 0;
my $isalivewait = 300; # Seconds to wait. my $isalivewait = 300; # Seconds to wait.
my $svcslice = "utah_elab_svc";
# #
# Parse command arguments. Once we return from getopts, all that should be # Parse command arguments. Once we return from getopts, all that should be
...@@ -68,6 +69,13 @@ if ($UID != 0) { ...@@ -68,6 +69,13 @@ if ($UID != 0) {
" Must be root to run this script!\n"); " Must be root to run this script!\n");
} }
#
# This daemon runs in the service slice only! Sorry for the hardwired name!
#
if (!defined($ENV{'USER'}) || $ENV{'USER'} ne $svcslice) {
exit(0);
}
# #
# For stop, look to see if the pid file exists. If so, kill it and exit. # For stop, look to see if the pid file exists. If so, kill it and exit.
# #
......
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