From b3cfd7e9d87c1cf32ea39f3cd41ecd167a0bc873 Mon Sep 17 00:00:00 2001 From: Ned Wright Date: Thu, 17 Aug 2023 17:40:22 +0000 Subject: [PATCH] Check /etc/environment exists before using it --- nodes/orchestration/package/cp-agent-info.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/orchestration/package/cp-agent-info.sh b/nodes/orchestration/package/cp-agent-info.sh index 9cd4037..0b7722a 100755 --- a/nodes/orchestration/package/cp-agent-info.sh +++ b/nodes/orchestration/package/cp-agent-info.sh @@ -129,7 +129,7 @@ get_setting() # Initials - gs echo "$gs_setting_value" } -. "/etc/environment" +[ -f /etc/environment ] && . "/etc/environment" if [ -n "${CP_ENV_FILESYSTEM}" ] ; then FILESYSTEM_PATH=$CP_ENV_FILESYSTEM fi