]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
cups: Add systemd unit file.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 1 Apr 2011 19:54:02 +0000 (21:54 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Fri, 1 Apr 2011 19:54:02 +0000 (21:54 +0200)
References #153.

pkgs/cups/cups.init [deleted file]
pkgs/cups/cups.nm
pkgs/cups/systemd/cups.service [new file with mode: 0644]

diff --git a/pkgs/cups/cups.init b/pkgs/cups/cups.init
deleted file mode 100644 (file)
index 8dc9137..0000000
+++ /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
index fd30c1aa3d2f32fd96a19938bd5bb69fb09e7dc7..02612986138a13bd102aee902b4ec4f1d048e6fc 100644 (file)
@@ -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 (file)
index 0000000..ae668ab
--- /dev/null
@@ -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
+