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

Make sure the expire_daemon exits nicely when not a PROTOGENI site.

parent 9728ab0e
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2008 University of Utah and the Flux Group.
# Copyright (c) 2008-2009 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
......@@ -12,9 +12,12 @@ use Getopt::Std;
# Look for things that need to be expired and resources released. This is
# incredibly primitive at the moment.
#
# Also TODO. On the clearinghouse we also want to expire things in the
# the geni-ch DB.
#
sub usage()
{
print "Usage: expire_daemon [-d] [-c | -s]\n";
print "Usage: expire_daemon [-d]\n";
exit(1);
}
my $optlist = "d";
......@@ -29,6 +32,7 @@ my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@";
my $PGENIDOMAIN = "@PROTOGENI_DOMAIN@";
my $PGENISUPPORT = @PROTOGENI_SUPPORT@;
my $PGENICLRHOUSE = @PROTOGENI_CLEARINGHOUSE@;
my $LOGFILE = "$TB/log/geniexpire";
my $IDLETIMES = "$TB/sbin/idletimes";
......@@ -48,6 +52,13 @@ if ($UID != 0) {
fatal("Must be root to run this script\n");
}
#
# Exit if not a protogeni site.
#
if (! $PGENISUPPORT) {
exit(0);
}
#
# Check args early so we get the right DB.
#
......
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