1 Star 0 Fork 33

gitee-yzh/cups

forked from src-openEuler/cups 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
cups-systemd-socket.patch 2.76 KB
一键复制 编辑 原始数据 按行查看 历史
weiwei_150212 提交于 2020-07-27 18:06 . version update
diff -up cups-2.2.12/scheduler/main.c.systemd-socket cups-2.2.12/scheduler/main.c
--- cups-2.2.12/scheduler/main.c.systemd-socket 2019-08-16 00:35:30.000000000 +0200
+++ cups-2.2.12/scheduler/main.c 2019-08-19 09:31:09.703370325 +0200
@@ -674,8 +674,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.12/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.2.12/scheduler/org.cups.cupsd.path.in
--- cups-2.2.12/scheduler/org.cups.cupsd.path.in.systemd-socket 2019-08-16 00:35:30.000000000 +0200
+++ cups-2.2.12/scheduler/org.cups.cupsd.path.in 2019-08-19 09:31:09.703370325 +0200
@@ -1,6 +1,6 @@
[Unit]
Description=CUPS Scheduler
-PartOf=org.cups.cupsd.service
+PartOf=cups.service
[Path]
PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
diff -up cups-2.2.12/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.2.12/scheduler/org.cups.cupsd.service.in
--- cups-2.2.12/scheduler/org.cups.cupsd.service.in.systemd-socket 2019-08-19 09:31:09.703370325 +0200
+++ cups-2.2.12/scheduler/org.cups.cupsd.service.in 2019-08-19 09:54:58.890036404 +0200
@@ -1,13 +1,13 @@
[Unit]
Description=CUPS Scheduler
Documentation=man:cupsd(8)
-After=sssd.service
+After=sssd.service network.target
[Service]
ExecStart=@sbindir@/cupsd -l
-Type=simple
+Type=notify
Restart=on-failure
[Install]
-Also=org.cups.cupsd.socket org.cups.cupsd.path
+Also=cups.socket cups.path
WantedBy=printer.target
diff -up cups-2.2.12/scheduler/org.cups.cupsd.socket.in.systemd-socket cups-2.2.12/scheduler/org.cups.cupsd.socket.in
--- cups-2.2.12/scheduler/org.cups.cupsd.socket.in.systemd-socket 2019-08-16 00:35:30.000000000 +0200
+++ cups-2.2.12/scheduler/org.cups.cupsd.socket.in 2019-08-19 09:31:09.703370325 +0200
@@ -1,6 +1,6 @@
[Unit]
Description=CUPS Scheduler
-PartOf=org.cups.cupsd.service
+PartOf=cups.service
[Socket]
ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
diff -up cups-2.2.12/scheduler/org.cups.cups-lpd.socket.systemd-socket cups-2.2.12/scheduler/org.cups.cups-lpd.socket
--- cups-2.2.12/scheduler/org.cups.cups-lpd.socket.systemd-socket 2019-08-16 00:35:30.000000000 +0200
+++ cups-2.2.12/scheduler/org.cups.cups-lpd.socket 2019-08-19 09:31:09.703370325 +0200
@@ -1,6 +1,6 @@
[Unit]
Description=CUPS LPD Server Socket
-PartOf=org.cups.cups-lpd.service
+PartOf=cups-lpd.service
[Socket]
ListenStream=515
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gitee-yzh/cups.git
git@gitee.com:gitee-yzh/cups.git
gitee-yzh
cups
cups
master

搜索帮助