bdf6254e5b
substitute default values for invalid job attributes (upstream issues #5229 and #5186)
50 lines
1.8 KiB
Diff
50 lines
1.8 KiB
Diff
diff -up cups-2.2.7/scheduler/main.c.systemd-socket cups-2.2.7/scheduler/main.c
|
|
--- cups-2.2.7/scheduler/main.c.systemd-socket 2018-04-03 14:23:12.128786025 +0200
|
|
+++ cups-2.2.7/scheduler/main.c 2018-04-03 14:23:12.148785913 +0200
|
|
@@ -691,8 +691,16 @@ main(int argc, /* I - Number of comm
|
|
|
|
#ifdef HAVE_ONDEMAND
|
|
if (OnDemand)
|
|
+ {
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
|
|
- else
|
|
+# ifdef HAVE_SYSTEMD
|
|
+ sd_notifyf(0, "READY=1\n"
|
|
+ "STATUS=Scheduler is running...\n"
|
|
+ "MAINPID=%lu",
|
|
+ (unsigned long) getpid());
|
|
+# endif /* HAVE_SYSTEMD */
|
|
+ } else
|
|
+
|
|
#endif /* HAVE_ONDEMAND */
|
|
if (fg)
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
|
|
diff -up cups-2.2.7/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.2.7/scheduler/org.cups.cupsd.path.in
|
|
--- cups-2.2.7/scheduler/org.cups.cupsd.path.in.systemd-socket 2018-03-23 04:48:36.000000000 +0100
|
|
+++ cups-2.2.7/scheduler/org.cups.cupsd.path.in 2018-04-03 14:23:12.148785913 +0200
|
|
@@ -3,7 +3,7 @@ Description=CUPS Scheduler
|
|
PartOf=org.cups.cupsd.service
|
|
|
|
[Path]
|
|
-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
|
|
+PathExistsGlob=@CUPS_REQUESTS@/d*
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
diff -up cups-2.2.7/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.2.7/scheduler/org.cups.cupsd.service.in
|
|
--- cups-2.2.7/scheduler/org.cups.cupsd.service.in.systemd-socket 2018-04-03 14:23:12.148785913 +0200
|
|
+++ cups-2.2.7/scheduler/org.cups.cupsd.service.in 2018-04-03 14:25:16.312088802 +0200
|
|
@@ -1,10 +1,11 @@
|
|
[Unit]
|
|
Description=CUPS Scheduler
|
|
Documentation=man:cupsd(8)
|
|
+After=network.target
|
|
|
|
[Service]
|
|
ExecStart=@sbindir@/cupsd -l
|
|
-Type=simple
|
|
+Type=notify
|
|
Restart=always
|
|
|
|
[Install]
|