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
6a728f7d
Commit
6a728f7d
authored
Jun 10, 2013
by
Srikanth Raju
Committed by
Leigh B Stoller
Jul 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scp GrubConf lib to remote
parent
10a8b16f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
utils/ec2import-image.pl
utils/ec2import-image.pl
+13
-6
No files found.
utils/ec2import-image.pl
View file @
6a728f7d
...
...
@@ -116,7 +116,15 @@ if(system("echo \"mkdir -p ~/.emulab\" | ssh -o UserKnownHostsFile=/dev/null ".
goto
cleanup
;
}
# Remotely execute the export script
# Check if Ruby and unzip exist
if
(
system
("
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
"
.
"
$remote
'which ruby unzip'
")){
print
STDERR
"
*** Could not find either ruby or unzip on remote machine!
";
$error
=
1
;
goto
cleanup
;
}
# scp export scripts
if
(
system
("
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
"
.
"
$TB
/sbin/export-template-remote.rb
$remote
:~/.emulab/export.rb
")){
print
STDERR
"
*** Couldn't scp exporter script into
$remote
\n
";
...
...
@@ -124,15 +132,14 @@ if(system("scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ".
goto
cleanup
;
}
# Check if Ruby exists
if
(
system
("
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
"
.
"
$remote
'which ruby unzip'
")){
print
STDERR
"
*** Could not find either ruby or unzip on remote machine!
";
if
(
system
("
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
"
.
"
$TB
/sbin/GrubConf.rb
$remote
:~/.emulab/GrubConf.rb
")){
print
STDERR
"
*** Couldn't scp exporter-grubconf script into
$remote
\n
";
$error
=
1
;
goto
cleanup
;
}
# Run it!
if
(
system
("
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
"
.
"
-t -t
$remote
'sudo ruby -C ~/.emulab < ~/.emulab/export.rb'
")){
print
STDERR
"
*** Remote image creation failed
\n
";
...
...
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