Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meta-elphel393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
meta-elphel393
Commits
19c1cfbf
Commit
19c1cfbf
authored
Sep 28, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor
parent
7a5792bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
elphel-scp.bbclass
classes/elphel-scp.bbclass
+4
-4
No files found.
classes/elphel-scp.bbclass
View file @
19c1cfbf
...
@@ -16,21 +16,21 @@ IDENTITY_FILE ??= "~/.ssh/id_rsa"
...
@@ -16,21 +16,21 @@ IDENTITY_FILE ??= "~/.ssh/id_rsa"
python do_target_scp () {
python do_target_scp () {
import subprocess
import subprocess
WORKDIR = d.getVar('WORKDIR', True)
WORKDIR = d.getVar('WORKDIR', True)
IDENTITY_FILE = d.getVar('IDENTITY_FILE', True)
IDENTITY_FILE = d.getVar('IDENTITY_FILE', True)
REMOTE_USER = d.getVar('REMOTE_USER', True)
REMOTE_USER = d.getVar('REMOTE_USER', True)
REMOTE_IP = d.getVar('REMOTE_IP', True)
REMOTE_IP = d.getVar('REMOTE_IP', True)
cmd = "tar -czvf "+WORKDIR+"/image.tar.gz -C "+WORKDIR+"/image ."
cmd = "tar -czvf "+WORKDIR+"/image.tar.gz -C "+WORKDIR+"/image ."
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
cmd = "ping "+REMOTE_IP+" -c 1"
cmd = "ping "+REMOTE_IP+" -c 1"
try:
try:
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
except subprocess.CalledProcessError:
except subprocess.CalledProcessError:
raise Exception("No route to target "+REMOTE_IP)
raise Exception("No route to target "+REMOTE_IP)
cmd = "scp -i "+IDENTITY_FILE+" -p "+WORKDIR+"/image.tar.gz "+REMOTE_USER+"@"+REMOTE_IP+":/"
cmd = "scp -i "+IDENTITY_FILE+" -p "+WORKDIR+"/image.tar.gz "+REMOTE_USER+"@"+REMOTE_IP+":/"
try:
try:
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
...
...
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