On Tue, Apr 07, 2020 at 05:24:27PM +0200, Peter Müller (peter.mueller@ipfire.org) wrote:
Hello *,
quite a bunch of initscripts in IPFire 2.x contains the /bin/sh as given interpreter in their shebang line. Since /bin/sh is a symlink to /bin/bash, I guess it makes sense to rewrite them to /bin/bash accordingly.
That way, we avoid potential collateral damage by following symlinks (dangerous!) and provide additional information so tools like shellcheck know what they are actually dealing with.
Opinions?
In principle I like the idea. But it would take some care: bash behaves differently when invoked as sh, so you can't simply change #/bin/sh to #/bin/bash without also checking the scripts one by one to make sure they still work as they should. Most probably would as the differences are small but some might need small adjustment.