projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move the master socket in the ganeti run dir
[ganeti-local]
/
lib
/
ssh.py
diff --git
a/lib/ssh.py
b/lib/ssh.py
index
6481d70
..
6f32e56
100644
(file)
--- a/
lib/ssh.py
+++ b/
lib/ssh.py
@@
-116,7
+116,7
@@
class SshRunner:
The ssh call to run 'command' on the remote host.
"""
The ssh call to run 'command' on the remote host.
"""
- argv = ["ssh", "-q"]
+ argv = [constants.SSH, "-q"]
argv.extend(KNOWN_HOSTS_OPTS)
argv.append(self._GetHostKeyAliasOption())
if batch:
argv.extend(KNOWN_HOSTS_OPTS)
argv.append(self._GetHostKeyAliasOption())
if batch:
@@
-163,15
+163,15
@@
class SshRunner:
success: True/False
"""
success: True/False
"""
- if not os.path.isfile(filename):
- logger.Error("file %s does not exist" % (filename))
- return False
-
if not os.path.isabs(filename):
logger.Error("file %s must be an absolute path" % (filename))
return False
if not os.path.isabs(filename):
logger.Error("file %s must be an absolute path" % (filename))
return False
- command = ["scp", "-q", "-p"]
+ if not os.path.isfile(filename):
+ logger.Error("file %s does not exist" % (filename))
+ return False
+
+ command = [constants.SCP, "-q", "-p"]
command.extend(KNOWN_HOSTS_OPTS)
command.extend(BATCH_MODE_OPTS)
command.append(self._GetHostKeyAliasOption())
command.extend(KNOWN_HOSTS_OPTS)
command.extend(BATCH_MODE_OPTS)
command.append(self._GetHostKeyAliasOption())