diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux index 1a354f1fdd4..ed6e5f4e920 100755 --- a/agents/check_mk_agent.linux +++ b/agents/check_mk_agent.linux @@ -812,7 +812,7 @@ section_nfs_mounts() { proc_mounts_file=${1} if inpath waitmax; then - STAT_VERSION=$(stat --version | head -1 | cut -d" " -f4) + STAT_VERSION=$(stat --version 2>/dev/null | head -1 | cut -d" " -f4) STAT_BROKE="5.3.0" json_templ() { diff --git a/agents/check_mk_agent.openwrt b/agents/check_mk_agent.openwrt index 74c24bd53e0..764dae9c141 100755 --- a/agents/check_mk_agent.openwrt +++ b/agents/check_mk_agent.openwrt @@ -490,7 +490,7 @@ section_mounts() { # call statfs()). If this lasts more then 2 seconds we # consider it as hanging. We need waitmax. if inpath waitmax; then - STAT_VERSION=$(stat --version | head -1 | cut -d" " -f4) + STAT_VERSION=$(stat --version 2>/dev/null | head -1 | cut -d" " -f4) STAT_BROKE="5.3.0" echo '<<>>'