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