Commit cb3839c9 authored by Tom Mitchell's avatar Tom Mitchell
Browse files

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; ...@@ -14,11 +14,12 @@ use Getopt::Std;
# #
sub usage() sub usage()
{ {
print "Usage: addauthority [-c] <certfile> <type>\n"; print "Usage: addauthority [-c] [-a] <certfile> <type>\n";
exit(1); exit(1);
} }
my $optlist = "c"; my $optlist = "ac";
my $asch = 0; my $asch = 0;
my $asam = 0;
# #
# Check args. # Check args.
...@@ -30,6 +31,9 @@ if (! getopts($optlist, \%options)) { ...@@ -30,6 +31,9 @@ if (! getopts($optlist, \%options)) {
if (defined($options{"c"})) { if (defined($options{"c"})) {
$asch = 1; $asch = 1;
} }
if (defined($options{"a"})) {
$asam = 1;
}
usage() usage()
if (@ARGV != 2); if (@ARGV != 2);
...@@ -40,6 +44,9 @@ use vars qw($GENI_DBNAME); ...@@ -40,6 +44,9 @@ use vars qw($GENI_DBNAME);
if ($asch) { if ($asch) {
$GENI_DBNAME = "geni-ch"; $GENI_DBNAME = "geni-ch";
} }
elsif ($asam) {
$GENI_DBNAME = "geni-cm";
}
# Now we can load the libraries after setting the proper DB. # Now we can load the libraries after setting the proper DB.
use lib '@prefix@/lib'; use lib '@prefix@/lib';
......
Supports Markdown
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