Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
f106b25e
Commit
f106b25e
authored
Oct 04, 2011
by
Leigh B Stoller
Browse files
When updating a cert, allow new URL to given on the command line.
parent
4a4fd836
Changes
1
Show whitespace changes
Inline
Side-by-side
protogeni/scripts/updatecert.in
View file @
f106b25e
...
...
@@ -13,13 +13,14 @@ use Getopt::Std;
#
sub
usage
()
{
print
STDERR
"
Usage: $0 [-o output_file] <certfile>
\n
";
print
STDERR
"
Usage: $0 [-o output_file]
[-u url]
<certfile>
\n
";
exit
(
-
1
);
}
my
$optlist
=
"
i:o:
";
my
$optlist
=
"
i:o:
u:
";
my
$ascm
=
0
;
my
$outfile
;
my
$tmpfile
;
my
$url
;
# Configure ...
my
$TB
=
"
@prefix
@
";
...
...
@@ -54,6 +55,9 @@ if (! getopts($optlist, \%options)) {
if
(
defined
(
$options
{"
o
"}))
{
$outfile
=
1
;
}
if
(
defined
(
$options
{"
u
"}))
{
$url
=
$options
{"
u
"};
}
usage
()
if
(
@ARGV
!=
1
);
my
$infile
=
$ARGV
[
0
];
...
...
@@ -75,9 +79,9 @@ my $keyfile = $certificate->WriteKeyToFile() or
my
$urn
=
$certificate
->
urn
();
my
$uuid
=
$certificate
->
uuid
();
my
$url
=
$certificate
->
URL
();
my
$hrn
=
$certificate
->
hrn
();
my
$arg
=
"
-o
";
$url
=
$certificate
->
URL
()
if
(
!
defined
(
$url
));
if
(
defined
(
$outfile
))
{
$arg
.=
$outfile
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment