Commit 6a728f7d authored by Srikanth Raju's avatar Srikanth Raju Committed by Leigh B Stoller

Scp GrubConf lib to remote

parent 10a8b16f
......@@ -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";
......
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