From 25f8042e4181b8f8ca0ab63adffbfdbad7382fb1 Mon Sep 17 00:00:00 2001 From: Sam Norbury Date: Thu, 30 Jul 2015 13:43:15 +0200 Subject: [PATCH] Checking for scp existance. Using command -v should be POSIX --- salt/client/ssh/ssh_py_shim.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/salt/client/ssh/ssh_py_shim.py b/salt/client/ssh/ssh_py_shim.py index 5954272262..c9a4506cd1 100644 --- a/salt/client/ssh/ssh_py_shim.py +++ b/salt/client/ssh/ssh_py_shim.py @@ -133,6 +133,10 @@ def main(argv): # pylint: disable=W0613 unpack_thin(thin_path) # Salt thin now is available to use else: + scpstat = subprocess.Popen(["command", "-v", "scp"]) + if not scpstat.returncode = 0 + sys.exit(EX_SCP_NOT_FOUND) + if not os.path.exists(OPTIONS.saltdir): need_deployment()