2021-11-27 15:55:20 +08:00
|
|
|
From fdc8835afc38ba10f2d1ef97d19a631e58552a27 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: yangjiaqi <yangjiaqi16@huawei.com>
|
|
|
|
|
Date: Thu, 25 Nov 2021 11:03:32 +0800
|
|
|
|
|
Subject: [PATCH 01/17] systemd
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
config/init/systemd/lxcfs.service.in | 10 +++++++---
|
|
|
|
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
|
|
2020-08-28 15:17:28 +08:00
|
|
|
diff --git a/config/init/systemd/lxcfs.service.in b/config/init/systemd/lxcfs.service.in
|
2021-11-27 15:55:20 +08:00
|
|
|
index 9cd4e59..3d763c6 100644
|
2020-08-28 15:17:28 +08:00
|
|
|
--- a/config/init/systemd/lxcfs.service.in
|
|
|
|
|
+++ b/config/init/systemd/lxcfs.service.in
|
|
|
|
|
@@ -5,12 +5,16 @@ Before=lxc.service
|
|
|
|
|
Documentation=man:lxcfs(1)
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
-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
|
2020-11-30 21:46:04 +08:00
|
|
|
+ExecStopPost=-/bin/fusermount -u /var/lib/lxc/
|
2020-08-28 15:17:28 +08:00
|
|
|
Delegate=yes
|
|
|
|
|
ExecReload=/bin/kill -USR1 $MAINPID
|
|
|
|
|
+Restart=always
|
|
|
|
|
+RestartSec=2s
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|
2021-11-27 15:55:20 +08:00
|
|
|
--
|
|
|
|
|
2.27.0
|
|
|
|
|
|