From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64816 invoked by alias); 2 Apr 2016 14:18:09 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 64802 invoked by uid 89); 2 Apr 2016 14:18:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:87a8lci, H*i:sk:87a8lci, H*MI:sk:87a8lci, Repin X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 02 Apr 2016 14:17:58 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 688A5627E0 for ; Sat, 2 Apr 2016 14:17:57 +0000 (UTC) Received: from [10.3.113.124] (ovpn-113-124.phx2.redhat.com [10.3.113.124]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u32EHnSj010603 for ; Sat, 2 Apr 2016 10:17:49 -0400 Subject: Re: How to install a custom permanent postinstall handler? To: cygwin@cygwin.com References: <838469265.20160401235308@yandex.ru> <87a8lcicxg.fsf@Rainer.invalid> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Message-ID: <56FFD48C.4000802@redhat.com> Date: Sat, 02 Apr 2016 14:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <87a8lcicxg.fsf@Rainer.invalid> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VnaiF3WLw95KNG0amGAD9k8ChEl7i2Cx6" X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00014.txt.bz2 --VnaiF3WLw95KNG0amGAD9k8ChEl7i2Cx6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1094 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 =3D /bin/dash . >> But every time bash update, it overwrite the link. >=20 > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --VnaiF3WLw95KNG0amGAD9k8ChEl7i2Cx6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 604 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW/9SNAAoJEKeha0olJ0NqVZgH/ivsPHKiPNVGlr1sAYcBTL3P cjIdjD55ZobU6YHzuLd/XDwDpkWPQaqRwEEYOTaP/TtNuXDxpYNhZzHSR5a3lvzW /k01sa1NqxkDttGCDXV/Pe+HU/OoOhGjuFVby0HhdLN0s5ADapIp+yFaZT6IvyQv O8C4TpB0RCWxo4x4sbHOd1PmoRy8PcAixNj3F/rJ25Z0dXqllU1mTnetWqMOVqiT HMggYVduQHj+PL2WNjKILMxNeKLsFd+Z7pFj0QkCIm7TF6+RpjtPxZj7iAw2U04V QOE7qDa0XgboY8fK5oR6OLwOILRf7w/AGe6pQQGc4FDqPXJrckzMvGd2LFXxZMU= =oOqP -----END PGP SIGNATURE----- --VnaiF3WLw95KNG0amGAD9k8ChEl7i2Cx6--