From: Angelo Compagnucci <angelo@amarulasolutions.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 1/7] package/cups-filters: fix cups-browsed service
Date: Wed, 24 Jun 2020 22:43:41 +0200 [thread overview]
Message-ID: <20200624204347.797088-2-angelo@amarulasolutions.com> (raw)
In-Reply-To: <20200624204347.797088-1-angelo@amarulasolutions.com>
cups-browsed service is compiled and installed by the package,
but the corresponding services file were not installed for
systemv and systemd.
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
package/cups-filters/S82cups-browsed | 48 ++++++++++++++++++++++++++++
package/cups-filters/cups-filters.mk | 13 +++++++-
2 files changed, 60 insertions(+), 1 deletion(-)
create mode 100644 package/cups-filters/S82cups-browsed
diff --git a/package/cups-filters/S82cups-browsed b/package/cups-filters/S82cups-browsed
new file mode 100644
index 0000000000..08909c7f98
--- /dev/null
+++ b/package/cups-filters/S82cups-browsed
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+DAEMON="cups-browsed"
+PIDFILE="/var/run/$DAEMON.pid"
+
+start() {
+ printf 'Starting %s: ' "$DAEMON"
+ # shellcheck disable=SC2086 # we need the word splitting
+ start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \
+ -- -c /etc/cups/cups-browsed.conf
+ status=$?
+ if [ "$status" -eq 0 ]; then
+ echo "OK"
+ else
+ echo "FAIL"
+ fi
+ return "$status"
+}
+
+stop() {
+ printf 'Stopping %s: ' "$DAEMON"
+ start-stop-daemon -K -q -p "$PIDFILE"
+ status=$?
+ if [ "$status" -eq 0 ]; then
+ rm -f "$PIDFILE"
+ echo "OK"
+ else
+ echo "FAIL"
+ fi
+ return "$status"
+}
+
+restart() {
+ stop
+ sleep 1
+ start
+}
+
+case "$1" in
+ start|stop|restart)
+ "$1";;
+ reload)
+ # Restart, since there is no true "reload" feature.
+ restart;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload}"
+ exit 1
+esac
diff --git a/package/cups-filters/cups-filters.mk b/package/cups-filters/cups-filters.mk
index 1f17018bc5..0a2622b87b 100644
--- a/package/cups-filters/cups-filters.mk
+++ b/package/cups-filters/cups-filters.mk
@@ -19,7 +19,8 @@ CUPS_FILTERS_CONF_OPTS = \
--with-cups-config=$(STAGING_DIR)/usr/bin/cups-config \
--with-sysroot=$(STAGING_DIR) \
--with-pdftops=pdftops \
- --with-jpeg
+ --with-jpeg \
+ --with-rcdir=no
ifeq ($(BR2_PACKAGE_LIBPNG),y)
CUPS_FILTERS_CONF_OPTS += --with-png
@@ -71,4 +72,14 @@ else
CUPS_FILTERS_CONF_OPTS += --disable-poppler
endif
+define CUPS_FILTERS_INSTALL_INIT_SYSV
+ $(INSTALL) -D -m 0755 package/cups-filters/S82cups-browsed \
+ $(TARGET_DIR)/etc/init.d/S82cups-browsed
+endef
+
+define CUPS_FILTERS_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 0755 $(@D)/utils/cups-browsed.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/cups-browsed.service
+endef
+
$(eval $(autotools-package))
--
2.25.1
next prev parent reply other threads:[~2020-06-24 20:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 20:43 [Buildroot] [PATCH v3 0/7] Cups revamp Angelo Compagnucci
2020-06-24 20:43 ` Angelo Compagnucci [this message]
2020-06-29 21:10 ` [Buildroot] [PATCH v3 1/7] package/cups-filters: fix cups-browsed service Thomas Petazzoni
2020-06-24 20:43 ` [Buildroot] [PATCH v3 2/7] package/cups-filters: bump to version 1.27.5 Angelo Compagnucci
2020-06-29 21:10 ` Thomas Petazzoni
2020-06-24 20:43 ` [Buildroot] [PATCH v3 3/7] package/cups: fix cups service Angelo Compagnucci
2020-08-04 21:38 ` Thomas Petazzoni
2020-06-24 20:43 ` [Buildroot] [PATCH v3 4/7] package/cups: bump to version 2.3.3 Angelo Compagnucci
2020-07-25 0:02 ` Adam Duskett
2020-08-04 21:38 ` Thomas Petazzoni
2020-09-05 8:14 ` Peter Korsgaard
2020-06-24 20:43 ` [Buildroot] [PATCH v3 5/7] package/cups: Add lp user as default cups user Angelo Compagnucci
2020-09-02 21:06 ` Arnout Vandecappelle
2020-09-05 8:04 ` Peter Korsgaard
2020-06-24 20:43 ` [Buildroot] [PATCH v3 6/7] package/cups: Add udev rules to assign usb printers group to lp Angelo Compagnucci
2020-09-02 21:07 ` Arnout Vandecappelle
2020-09-05 8:05 ` Peter Korsgaard
2020-06-24 20:43 ` [Buildroot] [PATCH v3 7/7] package/cups: adding python support Angelo Compagnucci
2020-09-02 21:07 ` Arnout Vandecappelle
2020-07-25 0:01 ` [Buildroot] [PATCH v3 0/7] Cups revamp Adam Duskett
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=20200624204347.797088-2-angelo@amarulasolutions.com \
--to=angelo@amarulasolutions.com \
--cc=buildroot@busybox.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.