On Mon, Jun 17, 2019 at 08:04:42PM +0200, Alexander Dahl wrote: > 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 > > > > # 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/*`" != "$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
Huh. Somehow I thought that $() was a bash feature, but it seems that POSIX sh [0] has it too. \o/ [0]: http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03 > > Grüße > Alex > > -- > /"\ ASCII RIBBON | »With 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.« > / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) -- Roland Hieber | r.hie...@pengutronix.de | Pengutronix e.K. | https://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de