Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
c3b1e225
Commit
c3b1e225
authored
Jul 29, 2011
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option -c to run in Utah, which need some extra work cause of the
ClearingHouse certificate.
parent
0bf47b73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
11 deletions
+26
-11
protogeni/scripts/fixcerts.in
protogeni/scripts/fixcerts.in
+26
-11
No files found.
protogeni/scripts/fixcerts.in
View file @
c3b1e225
...
...
@@ -13,10 +13,11 @@ use Getopt::Std;
#
sub
usage
()
{
print
STDERR
"
Usage: $0
\n
";
print
STDERR
"
Usage: $0
[-c]
\n
";
exit
(
-
1
);
}
my
$optlist
=
"";
my
$optlist
=
"
c
";
my
$asch
=
0
;
# Configure ...
my
$TB
=
"
@prefix
@
";
...
...
@@ -52,6 +53,9 @@ my %options = ();
if
(
!
getopts
(
$optlist
,
\
%options
))
{
usage
();
}
if
(
defined
(
$options
{"
c
"}))
{
$asch
=
1
;
}
usage
()
if
(
@ARGV
);
...
...
@@ -61,15 +65,17 @@ system("/bin/mkdir $stash") == 0 or
fatal
("
Could not mkdir
$stash
");
print
"
Copying current certificates to backup directory
\n
";
system
("
/bin/cp -p
$CMCERT
$SACERT
$stash
");
system
("
/bin/cp -p
$CMCERT
$SACERT
$
CHCERT
$
stash
");
system
("
/bin/cp -p
$SESCERT
$stash
")
if
(
-
e
$SESCERT
);
#
# Grab the CH certificate from Utah.
#
print
"
Fetching clearinghouse certificate from Utah ...
\n
";
system
("
$FETCH
-q -o
$CHCERT
http://boss.emulab.net/genich.pem
")
==
0
or
fatal
("
Could not fetch clearinghouse certificate from Utah
");
if
(
!
$asch
)
{
#
# Grab the CH certificate from Utah.
#
print
"
Fetching clearinghouse certificate from Utah ...
\n
";
system
("
$FETCH
-q -o
$CHCERT
http://boss.emulab.net/genich.pem
")
==
0
or
fatal
("
Could not fetch clearinghouse certificate from Utah
");
}
#
# Update our local certs. Certs are updated in place, old one saved.
...
...
@@ -86,6 +92,15 @@ print "Updating $SACERT\n";
system
("
$UPDATECERT
$SACERT
")
==
0
or
fatal
("
Could not update
$SACERT
");
if
(
$asch
)
{
print
"
Updating
$CHCERT
\n
";
system
("
$UPDATECERT
$CHCERT
")
==
0
or
fatal
("
Could not update
$CHCERT
");
system
("
$ADDAUTHORITY
-c
$CHCERT
ma
")
==
0
or
fatal
("
Could not add CH certificate to CH DB
");
}
#
# Add certs to the local SA database.
#
...
...
@@ -107,13 +122,13 @@ system("$ADDAUTHORITY -a $CMCERT cm") == 0
or
fatal
("
Could not add CM certificate to CM DB
");
#
# ReRegister our certs at the C
M
.
# ReRegister our certs at the C
H
.
#
system
("
$REREGISTER
")
==
0
or
fatal
("
Could not reregister certificates at the Clearinghouse
");
#
# ReRegister our resources.
# ReRegister our resources
at the CH
.
#
print
"
Registering resources at Clearinghouse
\n
";
system
("
$SUDO
-u
$PROTOUSER
$REGRESOURCES
-r
")
==
0
...
...
Write
Preview
Markdown
is supported
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