modify the way for checking cos

Signed-off-by: Jiaming Xu <jiamingxu@google.com>

address feedback

remove empty spaces

address feedbacks
This commit is contained in:
Jiaming Xu 2021-10-04 16:36:44 +00:00
parent 64291df71b
commit b9a0c5080a

View File

@ -26,7 +26,10 @@ fi
if [ "${CONTAINERD_CGROUPV2:-"false"}" == "true" ]; then
# check cos image
if uname -a | grep -q cos; then
if [ -r /etc/os-release ]; then
OS_ID="$(. /etc/os-release && echo "$ID")"
fi
if [ "${OS_ID}" = "cos" ]; then
if ! grep -q 'systemd.unified_cgroup_hierarchy=true' /proc/cmdline; then
echo "Setting up cgroupv2"