Escape all shell arguments uniformly

This commit is contained in:
zimbatm
2016-06-12 18:11:37 +01:00
parent 852e9c3096
commit 28fa4a2f03
9 changed files with 20 additions and 19 deletions

View File

@@ -71,8 +71,6 @@ let
};
};
shellEscape = x: "'${replaceChars ["'"] [("'\\'" + "'")] x}'";
loopForever = "while :; do ${coreutils}/bin/sleep 1; done";
initScript = writeScript "init.sh" (''
@@ -132,7 +130,7 @@ let
-o StrictHostKeyChecking=no \
-i /ssh.key \
-l Administrator \
192.168.0.1 -- ${shellEscape command}
192.168.0.1 -- ${lib.escapeShellArg command}
'') + optionalString (suspendTo != null) ''
${coreutils}/bin/touch /xchg/suspend_now
${loopForever}