Great investigation, and thanks for reporting back the results!
The bootstrap BSD looks like a nice recipe to have. I'd add a statement
class for it to the preconfigured Statements [1] so users can easily use
that when composing their scripts. And the ComputeService could also add
that automatical
The problem is that FreeBSD /bin/sh really does not like DOS style line
breaks so it interprets \r as part of the command name, therefore the
weird "not found" messages. I ended up with replacing \r\n with \n in
java on the fly, then uploading script to the server and executing it
with a one liner: