From a7a306b59619890fda599273177518668d281122 Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Thu, 17 Oct 2024 09:43:06 +0800 Subject: [PATCH] fix(install/preflight): cos longhorn/longhorn-9664 Signed-off-by: Chin-Ya Huang (cherry picked from commit 3715dba1dfac31c0a4df0b542ba9ed6e65da9ca5) --- pkg/remote/preflight/installer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/remote/preflight/installer.go b/pkg/remote/preflight/installer.go index c378d6bd..25a5a2fc 100644 --- a/pkg/remote/preflight/installer.go +++ b/pkg/remote/preflight/installer.go @@ -144,7 +144,7 @@ IFS=',' read -ra LONGHORN_DATA_DIRS <<< "$LONGHORN_DATA_PATHS" # Split comma-se # Function to check the operating system is Container Optimized OS (cos) function check_operating_system() { - os=$(cat /etc/os-release | grep '^ID=' | cut -d= -f2) + os=$(cat ${HOST_MOUNT_DIR}/etc/os-release | grep '^ID=' | cut -d= -f2) if [ "$os" != "cos" ]; then echo "ERROR: Operating system ($os) is not Container Optimized OS (cos)" exit 1