1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: Dmitry Bogatov <KAction@gnu.org>
Date: Sun, 28 Jan 2018 15:46:31 +0300
Subject: Explicitly specify PATH one remote side
This patch solves issue, when remote side uses dropbear ssh server,
which do not treat root specially, resulting ldconfig(8) missing in
PATH.
---
cdist/exec/remote.py | 1 +
1 file changed, 1 insertion(+)
Index: cdist/cdist/exec/remote.py
===================================================================
--- cdist.orig/cdist/exec/remote.py
+++ cdist/cdist/exec/remote.py
@@ -262,6 +262,7 @@ class Remote:
if env:
remote_env = [" export {env[0]}={env[1]};".format(env=item)
for item in env.items()]
+ remote_env += [" export PATH=/bin:/usr/bin:/sbin:/usr/sbin;"]
string_cmd = ("/bin/sh -c '{}{}'").format(" ".join(remote_env),
" ".join(command))
cmd.append(string_cmd)
|