"Laurent Bercot" <ska-supervis...@skarnet.org> writes:

You do not need a shebang in an up script. Up scripts are not
executable files. If you change the interpreter in the shebang, the
up script will *still* be processed by execlineb.

i feel like this might possibly be a reason why a number of people assume that _all_ s6-ecosystem scripts have to be execline scripts. A `run` script in an s6 servicedir can be any executable file, but an s6-rc `up` script for a oneshot (which i think many people might feel is roughly similar to a `run` script, in that it specifies a particular program to run) is always parsed by execlineb. Of course, that doesn't mean that one can't call some other interpreter from the execline script, as you note in the s6-rc-compile documentation:

They can be written in any scripting language by invoking the interpreter directly: for instance ‘/bin/sh -c “script”’, where script is a shell script.

However, while it's true that in both s6 and s6-rc, use of execline is not _ultimately_ required, in the s6-rc `up` context, one _does_ have to at least use execline to call the preferred interpreter with the relevant script.


Alexis.

Reply via email to