Commit cb3839c9 authored by Tom Mitchell's avatar Tom Mitchell

Added -a flag to addauthority script.

The -a flag causes the new authority to be written to the geni-cm
database. This is needed by the AM to allow new slice authorities in
development mode. In production mode the existing args would probably
suffice.
parent 4b6ea8f5
......@@ -14,11 +14,12 @@ use Getopt::Std;
#
sub usage()
{
print "Usage: addauthority [-c] <certfile> <type>\n";
print "Usage: addauthority [-c] [-a] <certfile> <type>\n";
exit(1);
}
my $optlist = "c";
my $optlist = "ac";
my $asch = 0;
my $asam = 0;
#
# Check args.
......@@ -30,6 +31,9 @@ if (! getopts($optlist, \%options)) {
if (defined($options{"c"})) {
$asch = 1;
}
if (defined($options{"a"})) {
$asam = 1;
}
usage()
if (@ARGV != 2);
......@@ -40,6 +44,9 @@ use vars qw($GENI_DBNAME);
if ($asch) {
$GENI_DBNAME = "geni-ch";
}
elsif ($asam) {
$GENI_DBNAME = "geni-cm";
}
# Now we can load the libraries after setting the proper DB.
use lib '@prefix@/lib';
......
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