mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] inetd services: don't use busybox's find in postinst
@ 2019-06-17 14:06 Roland Hieber
  2019-06-17 18:04 ` Alexander Dahl
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Hieber @ 2019-06-17 14:06 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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.

Replace the find call with a test that tries to expand the same pattern
that is used afterwards, so cat doesn't run with a non-matching pattern.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 rules/busybox.postinst   | 3 +--
 rules/dnsmasq.postinst   | 3 +--
 rules/inetutils.postinst | 3 +--
 rules/portmap.postinst   | 3 +--
 rules/pureftpd.postinst  | 3 +--
 rules/rsync.postinst     | 3 +--
 rules/urshd.postinst     | 3 +--
 7 files changed, 7 insertions(+), 14 deletions(-)

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
 
diff --git a/rules/dnsmasq.postinst b/rules/dnsmasq.postinst
index 6f564791d0c8..aa56d329fd72 100644
--- a/rules/dnsmasq.postinst
+++ b/rules/dnsmasq.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
 
diff --git a/rules/inetutils.postinst b/rules/inetutils.postinst
index 6f564791d0c8..aa56d329fd72 100644
--- a/rules/inetutils.postinst
+++ b/rules/inetutils.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
 
diff --git a/rules/portmap.postinst b/rules/portmap.postinst
index 6f564791d0c8..aa56d329fd72 100644
--- a/rules/portmap.postinst
+++ b/rules/portmap.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
 
diff --git a/rules/pureftpd.postinst b/rules/pureftpd.postinst
index 6f564791d0c8..aa56d329fd72 100644
--- a/rules/pureftpd.postinst
+++ b/rules/pureftpd.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
 
diff --git a/rules/rsync.postinst b/rules/rsync.postinst
index 6f564791d0c8..aa56d329fd72 100644
--- a/rules/rsync.postinst
+++ b/rules/rsync.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
 
diff --git a/rules/urshd.postinst b/rules/urshd.postinst
index 6f564791d0c8..aa56d329fd72 100644
--- a/rules/urshd.postinst
+++ b/rules/urshd.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
 
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] inetd services: don't use busybox's find in postinst
  2019-06-17 14:06 [ptxdist] [PATCH] inetd services: don't use busybox's find in postinst Roland Hieber
@ 2019-06-17 18:04 ` Alexander Dahl
  2019-06-18  9:08   ` Roland Hieber
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Dahl @ 2019-06-17 18:04 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber


[-- 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] inetd services: don't use busybox's find in postinst
  2019-06-17 18:04 ` Alexander Dahl
@ 2019-06-18  9:08   ` Roland Hieber
  2019-06-18  9:21     ` Roland Hieber
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Hieber @ 2019-06-18  9:08 UTC (permalink / raw)
  To: ptxdist

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH] inetd services: don't use busybox's find in postinst
  2019-06-18  9:08   ` Roland Hieber
@ 2019-06-18  9:21     ` Roland Hieber
  2019-06-18 10:52       ` [ptxdist] [PATCH v2] " Roland Hieber
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Hieber @ 2019-06-18  9:21 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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.

Replace the find call with a test that tries to expand the same pattern
that is used afterwards, so cat doesn't run with a non-matching pattern.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>

---
v1 -> v2:
 - use $(...) instead of `...` command expansion,
   https://github.com/koalaman/shellcheck/wiki/SC2006
---
 rules/busybox.postinst   | 3 +--
 rules/dnsmasq.postinst   | 3 +--
 rules/inetutils.postinst | 3 +--
 rules/portmap.postinst   | 3 +--
 rules/pureftpd.postinst  | 3 +--
 rules/rsync.postinst     | 3 +--
 rules/urshd.postinst     | 3 +--
 7 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/rules/busybox.postinst b/rules/busybox.postinst
index 6f564791d0c8..441d6ef02e43 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
 
diff --git a/rules/dnsmasq.postinst b/rules/dnsmasq.postinst
index 6f564791d0c8..441d6ef02e43 100644
--- a/rules/dnsmasq.postinst
+++ b/rules/dnsmasq.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
 
diff --git a/rules/inetutils.postinst b/rules/inetutils.postinst
index 6f564791d0c8..441d6ef02e43 100644
--- a/rules/inetutils.postinst
+++ b/rules/inetutils.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
 
diff --git a/rules/portmap.postinst b/rules/portmap.postinst
index 6f564791d0c8..441d6ef02e43 100644
--- a/rules/portmap.postinst
+++ b/rules/portmap.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
 
diff --git a/rules/pureftpd.postinst b/rules/pureftpd.postinst
index 6f564791d0c8..441d6ef02e43 100644
--- a/rules/pureftpd.postinst
+++ b/rules/pureftpd.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
 
diff --git a/rules/rsync.postinst b/rules/rsync.postinst
index 6f564791d0c8..441d6ef02e43 100644
--- a/rules/rsync.postinst
+++ b/rules/rsync.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
 
diff --git a/rules/urshd.postinst b/rules/urshd.postinst
index 6f564791d0c8..441d6ef02e43 100644
--- a/rules/urshd.postinst
+++ b/rules/urshd.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
 
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH v2] inetd services: don't use busybox's find in postinst
  2019-06-18  9:21     ` Roland Hieber
@ 2019-06-18 10:52       ` Roland Hieber
  0 siblings, 0 replies; 5+ messages in thread
From: Roland Hieber @ 2019-06-18 10:52 UTC (permalink / raw)
  To: ptxdist

This is v2, obviously...

On Tue, Jun 18, 2019 at 11:21:40AM +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.
> 
> Replace the find call with a test that tries to expand the same pattern
> that is used afterwards, so cat doesn't run with a non-matching pattern.
> 
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> 
> ---
> v1 -> v2:
>  - use $(...) instead of `...` command expansion,
>    https://github.com/koalaman/shellcheck/wiki/SC2006
> ---
>  rules/busybox.postinst   | 3 +--
>  rules/dnsmasq.postinst   | 3 +--
>  rules/inetutils.postinst | 3 +--
>  rules/portmap.postinst   | 3 +--
>  rules/pureftpd.postinst  | 3 +--
>  rules/rsync.postinst     | 3 +--
>  rules/urshd.postinst     | 3 +--
>  7 files changed, 7 insertions(+), 14 deletions(-)
> 
> diff --git a/rules/busybox.postinst b/rules/busybox.postinst
> index 6f564791d0c8..441d6ef02e43 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
>  
> diff --git a/rules/dnsmasq.postinst b/rules/dnsmasq.postinst
> index 6f564791d0c8..441d6ef02e43 100644
> --- a/rules/dnsmasq.postinst
> +++ b/rules/dnsmasq.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
>  
> diff --git a/rules/inetutils.postinst b/rules/inetutils.postinst
> index 6f564791d0c8..441d6ef02e43 100644
> --- a/rules/inetutils.postinst
> +++ b/rules/inetutils.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
>  
> diff --git a/rules/portmap.postinst b/rules/portmap.postinst
> index 6f564791d0c8..441d6ef02e43 100644
> --- a/rules/portmap.postinst
> +++ b/rules/portmap.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
>  
> diff --git a/rules/pureftpd.postinst b/rules/pureftpd.postinst
> index 6f564791d0c8..441d6ef02e43 100644
> --- a/rules/pureftpd.postinst
> +++ b/rules/pureftpd.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
>  
> diff --git a/rules/rsync.postinst b/rules/rsync.postinst
> index 6f564791d0c8..441d6ef02e43 100644
> --- a/rules/rsync.postinst
> +++ b/rules/rsync.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
>  
> diff --git a/rules/urshd.postinst b/rules/urshd.postinst
> index 6f564791d0c8..441d6ef02e43 100644
> --- a/rules/urshd.postinst
> +++ b/rules/urshd.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
>  
> -- 
> 2.20.1
> 
> 

-- 
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-18 10:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 14:06 [ptxdist] [PATCH] inetd services: don't use busybox's find in postinst Roland Hieber
2019-06-17 18:04 ` Alexander Dahl
2019-06-18  9:08   ` Roland Hieber
2019-06-18  9:21     ` Roland Hieber
2019-06-18 10:52       ` [ptxdist] [PATCH v2] " Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox