diff options
author | Roland Hieber <rhi@pengutronix.de> | 2019-06-18 11:21:40 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-06-20 12:18:40 +0200 |
commit | cf2786e5dfaf91393db9a36df70e073507c71e03 (patch) | |
tree | 576070775c1cb8da125e8ecd7667c119d138e4b2 | |
parent | 61cabe10a22bd9bb96b57cd846dc0f88103f33b3 (diff) | |
download | ptxdist-cf2786e5dfaf91393db9a36df70e073507c71e03.tar.gz ptxdist-cf2786e5dfaf91393db9a36df70e073507c71e03.tar.xz |
inetd services: don't use busybox's find in postinst
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>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | rules/busybox.postinst | 3 | ||||
-rw-r--r-- | rules/dnsmasq.postinst | 3 | ||||
-rw-r--r-- | rules/inetutils.postinst | 3 | ||||
-rw-r--r-- | rules/portmap.postinst | 3 | ||||
-rw-r--r-- | rules/pureftpd.postinst | 3 | ||||
-rw-r--r-- | rules/rsync.postinst | 3 | ||||
-rw-r--r-- | rules/urshd.postinst | 3 |
7 files changed, 7 insertions, 14 deletions
diff --git a/rules/busybox.postinst b/rules/busybox.postinst index 6f564791d..441d6ef02 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 6f564791d..441d6ef02 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 6f564791d..441d6ef02 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 6f564791d..441d6ef02 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 6f564791d..441d6ef02 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 6f564791d..441d6ef02 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 6f564791d..441d6ef02 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 |