From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Mon, 17 Jun 2019 20:04:42 +0200 From: Alexander Dahl Message-ID: <20190617180442.jrihq3gmeasznomk@falbala.home.lespocky.de> References: <20190617140646.9707-1-rhi@pengutronix.de> MIME-Version: 1.0 In-Reply-To: <20190617140646.9707-1-rhi@pengutronix.de> Subject: Re: [ptxdist] [PATCH] inetd services: don't use busybox's find in postinst List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============0925069619==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Roland Hieber --===============0925069619== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yu34sdqhlkfx6otf" Content-Disposition: inline --yu34sdqhlkfx6otf Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Roland, On Mon, Jun 17, 2019 at 04:06:46PM +0200, Roland Hieber wrote: > busybox's find doesn't understand '-empty', so when running these > postinst scripts on a system without GNU coreutils, they will display a > nice help text instead. In deed. > diff --git a/rules/busybox.postinst b/rules/busybox.postinst > index 6f564791d0c8..aa56d329fd72 100644 > --- a/rules/busybox.postinst > +++ b/rules/busybox.postinst > @@ -1,8 +1,7 @@ > #!/bin/sh > =20 > # generate inetd.conf > -if [ -d $DESTDIR/etc/inetd.conf.d ] && > - [ -z "`find $DESTDIR/etc/inetd.conf.d -type d -empty`" ]; then > +if [ "`echo $DESTDIR/etc/inetd.conf.d/*`" !=3D "$DESTDIR/etc/inetd.conf.= d/*" ]; then > cat $DESTDIR/etc/inetd.conf.d/* > $DESTDIR/etc/inetd.conf > fi The use of backticks is discouraged by shellcheck: https://github.com/koalaman/shellcheck/wiki/SC2006 Gr=FC=DFe Alex --=20 /"\ ASCII RIBBON | =BBWith the first link, the chain is forged. The first \ / CAMPAIGN | speech censured, the first thought forbidden, the X AGAINST | first freedom denied, chains us all irrevocably.=AB / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) --yu34sdqhlkfx6otf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEwo7muQJjlc+Prwj6NK3NAHIhXMYFAl0H1jYACgkQNK3NAHIh XMbADxAA0GjyCW7xzM8RsNM6tC0l+rkEHpZY/qltJ/vOnHSxuZjXYTYDeQTzMYLJ R8iOWdbZSV6U0tpKZEAsbY/XWBJESAUni+jkPGtK11H+RBpGzoutaAWNoIY0mR44 bnMRp6zVzaPtVw2KcmX0nBg24tCaf55sWcdOg3P1jstOxFCg8dEBwGNDgVj9JcY/ k7woGhaN5S1OXuypLQF52g38wQbbV1mGW7FgWstqqPxugLV4O+luxp6uV/eAECCc F8c43znrx00gAjnNkQfgqOgC94b6ZIuGnqL3XPXGIfSawgg6YCX9fZa26j9mka6g SxYcHoBAa10B9+oyP8udqrGMbcTAZQrlQ5mvLMvDEc0clSZACA6kKjQ6GYA2crOY 27bOLRObFV3pVT3jKLO/iyvo7+mHH0hI4Uy/M8F0M4b7ke8ozamZZYZBbWANRgqa RE53DuF8tIZ+8z88ctgDz8vqdZ7JVmSUcTz7AZ9xClIdHXWv56WArJW4k9v88lrl tofpR00pH8U205yNO+Oo7RxkEcKNapimwP0GWnraAJoaQGtfROwTnp5pundCQfoq DUly0J455wSh+yeQMtia2qK2eyt/CBgUO2nYZ4gTTswgYYWiHEEeUjqHbbO2b2vf xwkiOxKxLxYm4kZL0noerdn7CmCaVDhNenvtUX++hFY5gWMDm/E= =6IZA -----END PGP SIGNATURE----- --yu34sdqhlkfx6otf-- --===============0925069619== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KcHR4ZGlzdCBt YWlsaW5nIGxpc3QKcHR4ZGlzdEBwZW5ndXRyb25peC5kZQ== --===============0925069619==--