public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH 1/2] mountkernfs: Mount cgroup2 hierarchy
Date: Fri, 16 Jul 2021 11:14:12 +0000	[thread overview]
Message-ID: <20210716111413.23497-1-michael.tremer@ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
 src/initscripts/system/mountkernfs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/initscripts/system/mountkernfs b/src/initscripts/system/mountkernfs
index f0bfc5289..264da24c4 100644
--- a/src/initscripts/system/mountkernfs
+++ b/src/initscripts/system/mountkernfs
@@ -34,6 +34,11 @@ case "${1}" in
 			mount -n -t tmpfs -o nosuid,nodev,mode=755,size=8M /run /run || failed=1
 		fi
 
+		if ! mountpoint /sys/fs/cgroup &> /dev/null; then
+			boot_mesg -n " /sys/fs/cgroup" ${NORMAL}
+			mount -t cgroup2 none /sys/fs/cgroup || failed=1
+		fi
+
 		# create folder for dhcpcd changeroot
 		mkdir -p /run/dhcpcd/chroot
 		chown dhcpcd:dhcpcd /run/dhcpcd/chroot
-- 
2.20.1


             reply	other threads:[~2021-07-16 11:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 11:14 Michael Tremer [this message]
2021-07-16 11:14 ` [PATCH 2/2] libvirtd: Enable required cgroups Michael Tremer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210716111413.23497-1-michael.tremer@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox