From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tapani Tarvainen To: development@lists.ipfire.org Subject: Re: Question regarding shebang /bin/sh Date: Tue, 07 Apr 2020 19:06:06 +0300 Message-ID: <20200407160606.GA15898@tarvainen.info> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0322595594537499376==" List-Id: --===============0322595594537499376== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 07, 2020 at 05:24:27PM +0200, Peter M=C3=BCller (peter.mueller(a)= ipfire.org) wrote: >=20 > Hello *, >=20 > quite a bunch of initscripts in IPFire 2.x contains the /bin/sh as given in= terpreter > 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. >=20 > That way, we avoid potential collateral damage by following symlinks (dange= rous!) and provide > additional information so tools like shellcheck know what they are actually= dealing with. >=20 > 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. --=20 Tapani Tarvainen --===============0322595594537499376==--