From: Tapani Tarvainen <ipfire@tapanitarvainen.fi>
To: development@lists.ipfire.org
Subject: Re: Question regarding shebang /bin/sh
Date: Tue, 07 Apr 2020 19:06:06 +0300 [thread overview]
Message-ID: <20200407160606.GA15898@tarvainen.info> (raw)
In-Reply-To: <b742c6b3-2a6e-6902-d180-ceba253c1048@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 911 bytes --]
On Tue, Apr 07, 2020 at 05:24:27PM +0200, Peter Müller (peter.mueller(a)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.
--
Tapani Tarvainen
prev parent reply other threads:[~2020-04-07 16:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 15:24 Peter Müller
2020-04-07 15:27 ` Michael Tremer
2020-04-07 16:06 ` Tapani Tarvainen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200407160606.GA15898@tarvainen.info \
--to=ipfire@tapanitarvainen.fi \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox