Contents of /trunk/cups/patches/cups-2.1.1-systemd-socket.patch
Parent Directory | Revision Log
Revision 2728 -
(show annotations)
(download)
Wed Dec 2 11:53:01 2015 UTC (8 years, 9 months ago) by niro
File size: 1796 byte(s)
Wed Dec 2 11:53:01 2015 UTC (8 years, 9 months ago) by niro
File size: 1796 byte(s)
-fixed for cups-2.1.1
1 | diff -up cups-2.0.2/scheduler/main.c.ustTJg cups-2.0.2/scheduler/main.c |
2 | --- cups-2.0.2/scheduler/main.c.ustTJg 2015-02-10 13:40:24.121547526 +0100 |
3 | +++ cups-2.0.2/scheduler/main.c 2015-02-10 13:40:24.295545063 +0100 |
4 | @@ -658,8 +658,15 @@ main(int argc, /* I - Number of comm |
5 | |
6 | #if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD) |
7 | if (OnDemand) |
8 | + { |
9 | cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand."); |
10 | - else |
11 | +# ifdef HAVE_SYSTEMD |
12 | + sd_notifyf(0, "READY=1\n" |
13 | + "STATUS=Scheduler is running...\n" |
14 | + "MAINPID=%lu", |
15 | + (unsigned long) getpid()); |
16 | +# endif /* HAVE_SYSTEMD */ |
17 | + } else |
18 | #endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */ |
19 | if (fg) |
20 | cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground."); |
21 | diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.path.in |
22 | --- cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg 2014-03-21 15:50:24.000000000 +0100 |
23 | +++ cups-2.0.2/scheduler/org.cups.cupsd.path.in 2015-02-10 13:40:24.295545063 +0100 |
24 | @@ -2,7 +2,7 @@ |
25 | Description=CUPS Scheduler |
26 | |
27 | [Path] |
28 | -PathExists=@CUPS_CACHEDIR@/org.cups.cupsd |
29 | +PathExistsGlob=@CUPS_REQUESTS@/d* |
30 | |
31 | [Install] |
32 | WantedBy=multi-user.target |
33 | diff -up cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.service.in |
34 | --- cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg 2014-10-21 13:55:01.000000000 +0200 |
35 | +++ cups-2.0.2/scheduler/org.cups.cupsd.service.in 2015-02-10 13:40:24.296545049 +0100 |
36 | @@ -1,10 +1,11 @@ |
37 | [Unit] |
38 | Description=CUPS Scheduler |
39 | Documentation=man:cupsd(8) |
40 | +After=network.target |
41 | |
42 | [Service] |
43 | ExecStart=@sbindir@/cupsd -l |
44 | -Type=simple |
45 | +Type=notify |
46 | |
47 | [Install] |
48 | Also=org.cups.cupsd.socket org.cups.cupsd.path |