Escape all shell arguments uniformly
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user