:: Re: [DNG] Danger: Debian POSIX host…
Página Inicial
Delete this message
Reply to this message
Autor: Peter Duffy
Data:  
Para: dng
Assunto: Re: [DNG] Danger: Debian POSIX hostility
On Mon, 2020-09-21 at 18:07 -0700, Rick Moen wrote:
> Quoting marc (marcxdv@???):
>
> > Hmm - that might require some background: I'd venture that most of
> > these scripts were written when sh was just a symlink to bash, and
> > dash didn't exist, nevermind as a debian package.
>
> But that was always a blunder. The shebang should have been set to bash
> explicitly, if bash-specific features are used: In the cases of which
> you spoke, the coder made a lazy and unsupportable assumption.


With respect, I'd tend to disagree with that to some extent. The /bin/sh
symlink is built in, and is there from the point that the system is
installed. So it's a feature made available to users, and it's arguably
not a blunder to use it. Whether it's a good feature or not is
definitely a moot point. The convention in linux (think since it
originated) was that /bin/sh pointed to bash - until Debian decided to
do it differently.

I'd agree that best practice is specifying bash explicitly in the
shebang, if it's required (something that I personally have always done
since I first bitten by the bash/dash problem). I'm trying to remember
what happens on systems that default to ksh and csh - I assume that on
those, the shebang always needs to specify the shell to be used.