From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: Question regarding shebang /bin/sh
Date: Tue, 07 Apr 2020 16:27:55 +0100 [thread overview]
Message-ID: <53891B8B-C2F7-48EB-A5A0-33142C2AF705@ipfire.org> (raw)
In-Reply-To: <b742c6b3-2a6e-6902-d180-ceba253c1048@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
Hi,
I normally use /bin/bash, because I use “bashisms” and I have not a clue what is compatible with what shell.
I do not think that there is a single distribution who is linking /bin/sh to anything else than a GNU bash apart from Debian and everything that is using busybox.
The latter is totally irrelevant for us. Dash - the Debian shell is becoming less popular. People who are using fancy shells like ZSH or fish only use that for the user accounts, but the /bin/sh symlink remains untouched.
There is probably no collateral damage from changing our scripts from /bin/sh to /bin/bash. The other way round would definitely cause problems.
Hope this helps.
-Michael
> On 7 Apr 2020, at 16:24, 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?
>
> Thanks, and best regards,
> Peter Müller
next prev parent reply other threads:[~2020-04-07 15:27 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 [this message]
2020-04-07 16:06 ` Tapani Tarvainen
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=53891B8B-C2F7-48EB-A5A0-33142C2AF705@ipfire.org \
--to=michael.tremer@ipfire.org \
--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