diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-09-08 10:38:04 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-09-08 10:38:04 +0100 |
commit | c02f0a2cafa1964dc62d8ef9312083b606a9b7c5 (patch) | |
tree | d45fcdd0335c79bdb4ce02ec5b5e6c681939881e /sys-fs/lxcfs/files | |
parent | 8bba0fff0bc9709d45aeb68336998e11d118ab05 (diff) |
gentoo auto-resync : 08:09:2022 - 10:38:04
Diffstat (limited to 'sys-fs/lxcfs/files')
-rw-r--r-- | sys-fs/lxcfs/files/lxcfs-5.0.2.confd | 8 | ||||
-rw-r--r-- | sys-fs/lxcfs/files/lxcfs-5.0.2.initd | 27 | ||||
-rw-r--r-- | sys-fs/lxcfs/files/lxcfs-5.0.2.service | 18 |
3 files changed, 53 insertions, 0 deletions
diff --git a/sys-fs/lxcfs/files/lxcfs-5.0.2.confd b/sys-fs/lxcfs/files/lxcfs-5.0.2.confd new file mode 100644 index 000000000000..bc853aa681be --- /dev/null +++ b/sys-fs/lxcfs/files/lxcfs-5.0.2.confd @@ -0,0 +1,8 @@ +# /etc/conf.d/lxcfs: config file for /etc/init.d/lxcfs + +# lxcfs options: +# -l == calculate container load average instead of displaying host load average +# -u == don't display swap usage to containers + +LXCFS_OPTS="-l -u" +LXCFS_PATH="/var/lib/lxcfs" diff --git a/sys-fs/lxcfs/files/lxcfs-5.0.2.initd b/sys-fs/lxcfs/files/lxcfs-5.0.2.initd new file mode 100644 index 000000000000..f3119f2e8e82 --- /dev/null +++ b/sys-fs/lxcfs/files/lxcfs-5.0.2.initd @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +DAEMON=/usr/bin/lxcfs +PIDFILE=/run/lxcfs.pid + +start() { + ebegin "Starting lxcfs." + /sbin/modprobe -q fuse + install -d "${LXCFS_PATH}" + start-stop-daemon --start \ + --pidfile ${PIDFILE} \ + --exec ${DAEMON} \ + --background \ + --make-pidfile \ + -- ${LXCFS_OPTS} \ + "${LXCFS_PATH}" + eend ${?} +} + +stop() { + ebegin "Stopping lxcfs." + /usr/bin/fusermount3 -u "${LXCFS_PATH}" + start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} + eend ${?} +} diff --git a/sys-fs/lxcfs/files/lxcfs-5.0.2.service b/sys-fs/lxcfs/files/lxcfs-5.0.2.service new file mode 100644 index 000000000000..dc3dc9f18f63 --- /dev/null +++ b/sys-fs/lxcfs/files/lxcfs-5.0.2.service @@ -0,0 +1,18 @@ +[Unit] +Description=FUSE filesystem for LXC +ConditionVirtualization=!container +Before=lxc.service +Documentation=man:lxcfs(1) + +[Service] +ExecStartPre=/sbin/modprobe -q fuse +ExecStartPre=install -d /var/lib/lxcfs +ExecStart=/usr/bin/lxcfs /var/lib/lxcfs +KillMode=process +Restart=on-failure +ExecStopPost=-/usr/bin/fusermount3 -u /var/lib/lxcfs +Delegate=yes +ExecReload=/bin/kill -USR1 ${MAINPID} + +[Install] +WantedBy=multi-user.target |