From 533a8c70b3b757d2ca06de7392805ab5d1698a53 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sun, 4 Apr 2021 17:30:03 -0500 Subject: [PATCH] cgroup2_set_limits: fix harmless error message In legacy cgroups mode, we were running `mountinfo -q ""` which was generating an error message. If we return immediately when cgroup2_find_path returns an empty value, we avoid this message. --- sh/rc-cgroup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sh/rc-cgroup.sh b/sh/rc-cgroup.sh index fafc3b37..392c8b3d 100644 --- a/sh/rc-cgroup.sh +++ b/sh/rc-cgroup.sh @@ -189,6 +189,7 @@ cgroup2_set_limits() { local cgroup_path cgroup_path="$(cgroup2_find_path)" + [ -z "${cgroup_path}" ] && return 0 mountinfo -q "${cgroup_path}"|| return 0 rc_cgroup_path="${cgroup_path}/${RC_SVCNAME}" [ ! -d "${rc_cgroup_path}" ] && mkdir "${rc_cgroup_path}"