cups-systemd-socket.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. @@ -690,8 +690,15 @@ main(int argc, /* I - Number of comm
  5. #if defined(HAVE_ONDEMAND)
  6. if (OnDemand)
  7. + {
  8. cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
  9. - else
  10. +# ifdef HAVE_SYSTEMD
  11. + sd_notifyf(0, "READY=1\n"
  12. + "STATUS=Scheduler is running...\n"
  13. + "MAINPID=%lu",
  14. + (unsigned long) getpid());
  15. +# endif /* HAVE_SYSTEMD */
  16. + } else
  17. #endif /* HAVE_ONDEMAND */
  18. if (fg)
  19. cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
  20. diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.path.in
  21. --- cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg 2014-03-21 15:50:24.000000000 +0100
  22. +++ cups-2.0.2/scheduler/org.cups.cupsd.path.in 2015-02-10 13:40:24.295545063 +0100
  23. @@ -2,7 +2,7 @@
  24. Description=CUPS Scheduler
  25. [Path]
  26. -PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
  27. +PathExistsGlob=@CUPS_REQUESTS@/d*
  28. [Install]
  29. WantedBy=multi-user.target
  30. diff -up cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.service.in
  31. --- cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg 2014-10-21 13:55:01.000000000 +0200
  32. +++ cups-2.0.2/scheduler/org.cups.cupsd.service.in 2015-02-10 13:40:24.296545049 +0100
  33. @@ -1,10 +1,11 @@
  34. [Unit]
  35. Description=CUPS Scheduler
  36. Documentation=man:cupsd(8)
  37. +After=network.target
  38. [Service]
  39. ExecStart=@sbindir@/cupsd -l
  40. -Type=simple
  41. +Type=notify
  42. [Install]
  43. Also=org.cups.cupsd.socket org.cups.cupsd.path