On 04/02/2016 03:21 AM, Achim Gratz wrote:
> Andrey Repin writes:
>> Couple of my scripts rely on ASH/DASH functionality that is not present in
>> BASH. (Namely "local -".)
>> To amend that, I make a symlink /bin/sh = /bin/dash .
>> But every time bash update, it overwrite the link.
> 
> I think the correct course of action would be to put /bin/sh under
> control of the alternatives system.
Since I maintain both dash and bash, I'm game for setting up /bin/sh as
an alternative. However, I've never targeted the alternatives system
before as a package maintainer; any advice on docs or an example that I
could copy from?  I would probably make the defaults give bash higher
priority over dash, but with the alternatives in place, it would be easy
for a local user to swap the priorities on their system; I'd probably
also want to provide a convenience script to make swapping default sh an
easier task than users having to actually call directly into the
alternatives system.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to