From: Alexander Dahl <post@lespocky.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: Re: [ptxdist] [PATCH] inetd services: don't use busybox's find in postinst
Date: Mon, 17 Jun 2019 20:04:42 +0200 [thread overview]
Message-ID: <20190617180442.jrihq3gmeasznomk@falbala.home.lespocky.de> (raw)
In-Reply-To: <20190617140646.9707-1-rhi@pengutronix.de>
[-- Attachment #1.1: Type: text/plain, Size: 1179 bytes --]
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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 91 bytes --]
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2019-06-17 18:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 14:06 Roland Hieber
2019-06-17 18:04 ` Alexander Dahl [this message]
2019-06-18 9:08 ` Roland Hieber
2019-06-18 9:21 ` Roland Hieber
2019-06-18 10:52 ` [ptxdist] [PATCH v2] " Roland Hieber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190617180442.jrihq3gmeasznomk@falbala.home.lespocky.de \
--to=post@lespocky.de \
--cc=ptxdist@pengutronix.de \
--cc=rhi@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox