Skip to content

Commit b9a0c50

Browse files
author
Jiaming Xu
committed
modify the way for checking cos
Signed-off-by: Jiaming Xu <[email protected]> address feedback remove empty spaces address feedbacks
1 parent 64291df commit b9a0c50

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/e2e_node/gci-init.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ fi
2626

2727
if [ "${CONTAINERD_CGROUPV2:-"false"}" == "true" ]; then
2828
# check cos image
29-
if uname -a | grep -q cos; then
29+
if [ -r /etc/os-release ]; then
30+
OS_ID="$(. /etc/os-release && echo "$ID")"
31+
fi
32+
if [ "${OS_ID}" = "cos" ]; then
3033
if ! grep -q 'systemd.unified_cgroup_hierarchy=true' /proc/cmdline; then
3134
echo "Setting up cgroupv2"
3235

0 commit comments

Comments
 (0)