From 60258d0d6f6af1603b0caeeabca075727380d687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A0=E7=A3=8A?= Date: Fri, 14 Jun 2024 10:35:01 +0800 Subject: [PATCH] fix check core_pattern.yaml --- handler/checker/tasks/observer/system/core_pattern.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/handler/checker/tasks/observer/system/core_pattern.yaml b/handler/checker/tasks/observer/system/core_pattern.yaml index 6b003d69..9347c029 100644 --- a/handler/checker/tasks/observer/system/core_pattern.yaml +++ b/handler/checker/tasks/observer/system/core_pattern.yaml @@ -8,14 +8,13 @@ task: verify: '[[ $core_pattern != *" "* ]]' err_msg: 'kernel.core_pattern: #{core_pattern} , is not recommended for configuring functions other than the specified core path' - type: ssh - ssh: 'dirname ${core_pattern}' + ssh: 'dirname "${core_pattern}"' result: set_value: core_path verify: '[ -d "$core_path" ]' err_msg: 'core_path: #{core_path} is not exist. Please create it.' -#d - type: ssh - ssh: "df \"$directory\" | awk 'NR==2 {print $4}'" + ssh: "df \"#{core_path}\" | awk 'NR==2 {print $4}'" result: set_value: core_path_free_space verify_type: min