Skip to content

Commit babf5a7

Browse files
authored
Merge pull request #314 from glorpen/openrc
Skip Systemd cgroup creation on systems with OpenRC
2 parents d3b9610 + 490674a commit babf5a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ sanitize_cgroups() {
4141
fi
4242
done
4343

44-
if ! test -e /sys/fs/cgroup/systemd ; then
44+
if [ ! -e /sys/fs/cgroup/systemd ] && [ $(cat /proc/self/cgroup | grep '^1:name=openrc:' | wc -l) -eq 0 ]; then
4545
mkdir /sys/fs/cgroup/systemd
4646
mount -t cgroup -o none,name=systemd none /sys/fs/cgroup/systemd
4747
fi

0 commit comments

Comments
 (0)