lxcfs/0001-systemd.patch
zhangsong234 6ac00237f7 lxcfs: fix reinstall bug
Signed-off-by: zhangsong234 <zhangsong34@huawei.com>
2020-11-30 21:46:33 +08:00

25 lines
782 B
Diff

diff --git a/config/init/systemd/lxcfs.service.in b/config/init/systemd/lxcfs.service.in
index 9cd4e59..2421a54 100644
--- 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
+ExecStopPost=-/bin/fusermount -u /var/lib/lxc/
Delegate=yes
ExecReload=/bin/kill -USR1 $MAINPID
+Restart=always
+RestartSec=2s
[Install]
WantedBy=multi-user.target