Open pintomi1989 opened 1 month ago
@georgekarrv what happens if we don't specify an interpreter in the script? Do we run the script in the host's default shell? Does Fleet always run in bin/sh?
@dherder confirmed that we can upload scripts w/o an interpreter.
@noahtalerman I can confirm that the script will run w/o a declared interpreter.
@noahtalerman the script will run under /bin/sh if there is no shebang. So, with that in mind, why do we not allow for running a bash env?
Moved original issue description here for safekeeping:
Original issue: https://github.com/fleetdm/fleet/issues/21299
/bin/bash is not currently accepted as a shell interpreter
/bin/sh and /bin/zsh are accepted
Ubuntu machines have bash installed as the default
If a customer has scripts written in bash, they need to rewrite their scripts in either sh or zsh, which is time consuming when there are a large number of scripts in question
Also, there are "bash-isms" that are not POSIX (sh) compatible:
Rewriting scripts in sh or zsh
Allow /bin/bash as a shell interpreter
Upload scripts to Fleet written in bash, and have them function properly
customer-sarahwu
: Row 16 in this spreadsheet herecustomer-cisneros
: Can we have /bin/bash accepted as a shell interpreter in addition to /bin/sh and /bin/zsh? We're finding scripts written in /bin/bash (which every machine in our fleet will have installed as it's a default with Ubuntu) might need to be re-written due to differences between bash and sh.prospect-pingouin
: https://fleetdm.slack.com/archives/C07GLME5P7C/p1727895450146609@noahtalerman: Eventually TODO