2014-10-16 13:40:39 +00:00
|
|
|
diff -up cups-2.0.0/cups/usersys.c.systemd-socket cups-2.0.0/cups/usersys.c
|
|
|
|
--- cups-2.0.0/cups/usersys.c.systemd-socket 2014-08-28 16:37:22.000000000 +0100
|
|
|
|
+++ cups-2.0.0/cups/usersys.c 2014-10-16 14:39:05.839530224 +0100
|
2014-09-12 16:19:24 +00:00
|
|
|
@@ -1028,7 +1028,7 @@ cups_read_client_conf(
|
2011-10-04 11:03:00 +00:00
|
|
|
struct stat sockinfo; /* Domain socket information */
|
|
|
|
|
|
|
|
if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
|
|
|
|
- (sockinfo.st_mode & S_IRWXO) == S_IRWXO)
|
|
|
|
+ (sockinfo.st_mode & (S_IROTH | S_IWOTH)) == (S_IROTH | S_IWOTH))
|
|
|
|
cups_server = CUPS_DEFAULT_DOMAINSOCKET;
|
|
|
|
else
|
|
|
|
#endif /* CUPS_DEFAULT_DOMAINSOCKET */
|
2014-10-16 13:40:39 +00:00
|
|
|
diff -up cups-2.0.0/scheduler/main.c.systemd-socket cups-2.0.0/scheduler/main.c
|
|
|
|
--- cups-2.0.0/scheduler/main.c.systemd-socket 2014-10-16 14:39:05.811530076 +0100
|
|
|
|
+++ cups-2.0.0/scheduler/main.c 2014-10-16 14:39:05.839530224 +0100
|
2014-09-12 16:19:24 +00:00
|
|
|
@@ -653,6 +653,12 @@ main(int argc, /* I - Number of comm
|
|
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
|
2014-04-17 14:59:54 +00:00
|
|
|
else
|
2014-09-12 16:19:24 +00:00
|
|
|
#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
|
2014-04-17 14:59:54 +00:00
|
|
|
+#ifdef HAVE_SYSTEMD
|
|
|
|
+ sd_notifyf(0, "READY=1\n"
|
|
|
|
+ "STATUS=Scheduler is running...\n"
|
|
|
|
+ "MAINPID=%lu",
|
|
|
|
+ (unsigned long) getpid());
|
|
|
|
+#endif /* HAVE_SYSTEMD */
|
|
|
|
if (fg)
|
2014-09-12 16:19:24 +00:00
|
|
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
|
|
|
|
else
|
2014-10-16 13:40:39 +00:00
|
|
|
diff -up cups-2.0.0/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.0.0/scheduler/org.cups.cupsd.path.in
|
|
|
|
--- cups-2.0.0/scheduler/org.cups.cupsd.path.in.systemd-socket 2014-03-21 14:50:24.000000000 +0000
|
|
|
|
+++ cups-2.0.0/scheduler/org.cups.cupsd.path.in 2014-10-16 14:39:05.839530224 +0100
|
2014-09-12 16:19:24 +00:00
|
|
|
@@ -2,7 +2,7 @@
|
|
|
|
Description=CUPS Scheduler
|
|
|
|
|
|
|
|
[Path]
|
|
|
|
-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
|
|
|
|
+PathExistsGlob=@CUPS_REQUESTS@/d*
|
2011-08-05 14:11:04 +00:00
|
|
|
|
2014-09-12 16:19:24 +00:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
2014-10-16 13:40:39 +00:00
|
|
|
diff -up cups-2.0.0/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.0.0/scheduler/org.cups.cupsd.service.in
|
|
|
|
--- cups-2.0.0/scheduler/org.cups.cupsd.service.in.systemd-socket 2014-03-21 14:50:24.000000000 +0000
|
|
|
|
+++ cups-2.0.0/scheduler/org.cups.cupsd.service.in 2014-10-16 14:39:28.636650224 +0100
|
|
|
|
@@ -2,9 +2,10 @@
|
2014-09-12 16:19:24 +00:00
|
|
|
Description=CUPS Scheduler
|
2014-10-18 14:04:51 +00:00
|
|
|
+After=network.target
|
2014-09-12 16:19:24 +00:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
-ExecStart=@sbindir@/cupsd -l
|
|
|
|
-Type=simple
|
|
|
|
+ExecStart=@sbindir@/cupsd -f
|
|
|
|
+Type=notify
|
2011-08-05 14:11:04 +00:00
|
|
|
|
2014-09-12 16:19:24 +00:00
|
|
|
[Install]
|
|
|
|
Also=org.cups.cupsd.socket org.cups.cupsd.path
|
2014-10-16 13:40:39 +00:00
|
|
|
WantedBy=printer.target
|