40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From c0a2baa7e79ef6d7a0060611b4244c4946c246b8 Mon Sep 17 00:00:00 2001
|
|
From: vegbir <yangjiaqi16@huawei.com>
|
|
Date: Tue, 11 Jul 2023 08:41:53 +0000
|
|
Subject: [PATCH 01/15] systemd
|
|
|
|
append:remove-lxcfs-tools-dependency-for-common-use
|
|
|
|
Signed-off-by: vegbir <yangjiaqi16@huawei.com>
|
|
---
|
|
config/init/systemd/lxcfs.service.in | 10 +++++++---
|
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/config/init/systemd/lxcfs.service.in b/config/init/systemd/lxcfs.service.in
|
|
index 8b43f5a..bae1d08 100644
|
|
--- a/config/init/systemd/lxcfs.service.in
|
|
+++ b/config/init/systemd/lxcfs.service.in
|
|
@@ -6,12 +6,16 @@ Documentation=man:lxcfs(1)
|
|
|
|
[Service]
|
|
OOMScoreAdjust=-1000
|
|
-ExecStart=/usr/bin/lxcfs {{LXCFSTARGETDIR}}
|
|
+ExecStartPre=-/usr/local/bin/lxcfs-tools prestart
|
|
+ExecStart=/usr/bin/lxcfs /var/lib/lxc/lxcfs/
|
|
+ExecStartPost=-/usr/local/bin/lxcfs-tools remount -a
|
|
KillMode=process
|
|
-Restart=on-failure
|
|
-ExecStopPost=-/bin/fusermount -u {{LXCFSTARGETDIR}}
|
|
+ExecStop=-/usr/local/bin/lxcfs-tools umount -a
|
|
+ExecStopPost=-/bin/fusermount -u /var/lib/lxc/
|
|
Delegate=yes
|
|
ExecReload=/bin/kill -USR1 $MAINPID
|
|
+Restart=always
|
|
+RestartSec=2s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
--
|
|
2.41.0
|
|
|