From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] inetd services: don't use busybox's find in postinst
Date: Tue, 18 Jun 2019 11:08:43 +0200 [thread overview]
Message-ID: <20190618090843.dsveenv54dzgyrr3@pengutronix.de> (raw)
In-Reply-To: <20190617180442.jrihq3gmeasznomk@falbala.home.lespocky.de>
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.hieber@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
next prev parent reply other threads:[~2019-06-18 9:08 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
2019-06-18 9:08 ` Roland Hieber [this message]
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=20190618090843.dsveenv54dzgyrr3@pengutronix.de \
--to=rhi@pengutronix.de \
--cc=ptxdist@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