:: Re: [DNG] vdev packaging effort ( w…
Página Principal
Delete this message
Reply to this message
Autor: Didier Kryn
Data:  
Para: dng
Assunto: Re: [DNG] vdev packaging effort ( was: state of what's working for modern desktop usage)
Le 11/02/2016 17:04, Rainer Weikusat a écrit :
> Didier Kryn <kryn@???> writes:
>
> [...]
>
>>> It should be the name of a shell capable of running Bourne/ standard
>>> shell scripts. But this may not work if the /bin/dash in the original
>>> script was there for a reason, ie, it was using dash features.
>>>
>>      As I already wrote, vdev was working well with busybox's ash.,
>> replacing 'dash' with 'sh' in the shebang.

>>
>>      If the question is why Jude replaced /bin/sh with /bin/dash in the
>> middle of the development, I think it was to make sure to not invoke
>> bash. But (sorry for the repetition) I used to modify the shebang
>> everytime I tested a new version, and there was never any issue with
>> the shell.
> There is no question here. *If* the script in question uses dash
> spuriously, ie, it doesn't use features specific to dash but is actually
> a Bourne shell script, replacing /bin/dash with /bin/sh should be
> fine. If not, stuff is going to break sooner or later, either because
> /bin/sh isn't really dash (eg, someone might use bash for that) or
> because of difference between the busybox and Debian (d)ash forks.

>


     There shouldn't be any "feature specific to dash", by construction. 
The only reason why dash (Debian's Ash, I guess) exists is portability 
through POSIX conformance. I think Jude uses dash instead of bash, Xsh 
or what else to let it check for POSIX conformance, and he wants to be 
sure to not invoke bash by mistake; he might answer himself, but this is 
the only sensible reason I see.


     But POSIX conformance is not enough, /bin/dash in the shebang 
obviously renders portability impossible.  Just look at any system 
script in your Debian or Devuan system and tell me if any of them start 
with #! /bin/dash.


> This depends on the code of the script/ scripts in question and blindly
> advocating to replace the shell chosen by whoever wrote the script with
> a generic name is not a good idea.

     Who speaks of doing it blindly? I have clearly written I had 
checked it many times and there was never an issue. Further more, I 
consider that if there was an error,


     1) the script should be corrected
     2) a bug report should be sent to the authors of the non-conformant 
shell, be it Busybox or Debian.


     Didier