From: Stefan Schantl Date: Fri, 1 Apr 2011 19:54:02 +0000 (+0200) Subject: cups: Add systemd unit file. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dde04de7fdf7f7d7102ba187a0825d034ad0caa2;p=ipfire-3.x.git cups: Add systemd unit file. References #153. --- diff --git a/pkgs/cups/cups.init b/pkgs/cups/cups.init deleted file mode 100644 index 8dc913730..000000000 --- a/pkgs/cups/cups.init +++ /dev/null @@ -1,9 +0,0 @@ -description "Common Unix Printing System" -author "IPFire Team" - -start on started network -stop on kill-all-network-services or stopping network - -exec /usr/sbin/cupsd -c /etc/cups/cupsd.conf -expect daemon -respawn diff --git a/pkgs/cups/cups.nm b/pkgs/cups/cups.nm index fd30c1aa3..026129861 100644 --- a/pkgs/cups/cups.nm +++ b/pkgs/cups/cups.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include PKG_NAME = cups PKG_VER = 1.4.5 -PKG_REL = 3 +PKG_REL = 4 PKG_MAINTAINER = PKG_GROUPS = Applications/Printing @@ -78,3 +78,8 @@ define STAGE_INSTALL -mkdir -pv $(BUILDROOT)/etc/logrotate.d/ cp -vf $(DIR_SOURCE)/cups.logrotate $(BUILDROOT)/etc/logrotate.d/cups endef + +# This line has to be added at the installation of cups. +# File: /lib/udev/rules.d/99-systemd.rules +# Line: SUBSYSTEM=="usb", ATTR{serial}=="AL01077498", TAG+="systemd", ENV{SYSTEMD_WANTS}="cups.service" + diff --git a/pkgs/cups/systemd/cups.service b/pkgs/cups/systemd/cups.service new file mode 100644 index 000000000..ae668ab11 --- /dev/null +++ b/pkgs/cups/systemd/cups.service @@ -0,0 +1,10 @@ +[Unit] +Description=CUPS Printing Service + +[Service] +ExecStart=/usr/sbin/cupsd -f -c /etc/cups/cupsd.conf +ExecStartPost=/sbin/udevadm trigger --subsystem-match=usb --attr-match=serial=AL01077498 + +[Install] +WantedBy=multi-user.target +