diff --git a/sources/lib/platform/aix/check_aix_fs_mounts.sh b/sources/lib/platform/aix/check_aix_fs_mounts.sh index 3296fe5..6ba2a41 100644 --- a/sources/lib/platform/aix/check_aix_fs_mounts.sh +++ b/sources/lib/platform/aix/check_aix_fs_mounts.sh @@ -62,7 +62,7 @@ lsfs -ac >>${HC_STDOUT_LOG} 2>>${HC_STDERR_LOG} (( $? == 0)) || return $? # check for each auto-mount configured file system (except /) -lsfs -ac |\ +lsfs -ac 2>/dev/null |\ grep -v -E -e '^#' -e '^\/:' |\ grep -E -e '.*:.*:.*:.*:.*:.*:.*:yes:.*' |\ cut -f1 -d':' |\ diff --git a/sources/lib/platform/linux/check_linux_fs_mounts.sh b/sources/lib/platform/linux/check_linux_fs_mounts.sh index 3a85ebf..5ce8bd9 100644 --- a/sources/lib/platform/linux/check_linux_fs_mounts.sh +++ b/sources/lib/platform/linux/check_linux_fs_mounts.sh @@ -62,11 +62,10 @@ mount >>${HC_STDOUT_LOG} 2>>${HC_STDERR_LOG} (( $? == 0 )) || return $? # check for each auto-mount configured file system (except /) -cat /etc/fstab |\ - grep -v -E -e '^#' -e '^$' \ - -e '[ \t]*.*[ \t]+(proc|swap|sysfs|devpts|tmpfs).*' \ - -e '(floppy|cdrom)' \ - -e '[ \t]*\/[ \t]+' |\ +grep -v -E -e '^#' -e '^$' \ + -e '[ \t]*.*[ \t]+(proc|swap|sysfs|devpts|tmpfs).*' \ + -e '(floppy|cdrom)' \ + -e '[ \t]*\/[ \t]+' etc/fstab 2>/dev/null |\ awk '{print $2}' |\ while read _FS do diff --git a/sources/lib/platform/linux/check_linux_ntp_status.sh b/sources/lib/platform/linux/check_linux_ntp_status.sh index 5408893..c101160 100644 --- a/sources/lib/platform/linux/check_linux_ntp_status.sh +++ b/sources/lib/platform/linux/check_linux_ntp_status.sh @@ -132,7 +132,7 @@ else fi # 1) active server -_NTP_PEER="$(grep -E -e '^\*' 2>/dev/null ${HC_STDOUT_LOG} | awk '{ print $1 }') 2>/dev/null" +_NTP_PEER="$(grep -E -e '^\*' 2>/dev/null ${HC_STDOUT_LOG} | awk '{ print $1 }' 2>/dev/null)" case ${_NTP_PEER} in \*127.127.1.0*) _MSG="NTP is synchronizing against its internal clock" @@ -152,7 +152,7 @@ log_hc "$0" ${_STC} "${_MSG}" # 2) offset value if (( _STC == 0 )) then - _CURR_OFFSET="$(grep -E -e '^\*' 2>/dev/null ${HC_STDOUT_LOG} | awk '{ print $9 }') 2>/dev/null" + _CURR_OFFSET="$(grep -E -e '^\*' 2>/dev/null ${HC_STDOUT_LOG} | awk '{ print $9 }' 2>/dev/null)" case ${_CURR_OFFSET} in +([-0-9])*(.)*([0-9])) # numeric, OK (negatives are OK too!)