Luis Mendes <
[email protected]> wrote:
set json ""
if {[catch {exec ssh -T $master_server "sudo su - -c '$cmd'"} json ropts]}
Why does the exec returns an error that is caught?
I'm not understanding what is wrong.
If you read the documentation for [exec] you will see that exec will
also throw an error if the exec'ed process writes anything to the stderr stream.
Is it possible that one of sudo, su, or 'cmd' writes something to
stderr?
Also, "sudo su" is extraneous, you really only need one or the other,
not both together, to become root (provided 'sudo' is setup to let your
regular user 'sudo' to root).
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)