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

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)

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to