Small fixes in aix/linux plugins

This commit is contained in:
patvdv 2018-07-15 17:00:47 +02:00
parent 1dcc379141
commit 2035943b53
3 changed files with 7 additions and 8 deletions

View File

@ -62,7 +62,7 @@ lsfs -ac >>${HC_STDOUT_LOG} 2>>${HC_STDERR_LOG}
(( $? == 0)) || return $? (( $? == 0)) || return $?
# check for each auto-mount configured file system (except /) # check for each auto-mount configured file system (except /)
lsfs -ac |\ lsfs -ac 2>/dev/null |\
grep -v -E -e '^#' -e '^\/:' |\ grep -v -E -e '^#' -e '^\/:' |\
grep -E -e '.*:.*:.*:.*:.*:.*:.*:yes:.*' |\ grep -E -e '.*:.*:.*:.*:.*:.*:.*:yes:.*' |\
cut -f1 -d':' |\ cut -f1 -d':' |\

View File

@ -62,11 +62,10 @@ mount >>${HC_STDOUT_LOG} 2>>${HC_STDERR_LOG}
(( $? == 0 )) || return $? (( $? == 0 )) || return $?
# check for each auto-mount configured file system (except /) # check for each auto-mount configured file system (except /)
cat /etc/fstab |\ grep -v -E -e '^#' -e '^$' \
grep -v -E -e '^#' -e '^$' \
-e '[ \t]*.*[ \t]+(proc|swap|sysfs|devpts|tmpfs).*' \ -e '[ \t]*.*[ \t]+(proc|swap|sysfs|devpts|tmpfs).*' \
-e '(floppy|cdrom)' \ -e '(floppy|cdrom)' \
-e '[ \t]*\/[ \t]+' |\ -e '[ \t]*\/[ \t]+' etc/fstab 2>/dev/null |\
awk '{print $2}' |\ awk '{print $2}' |\
while read _FS while read _FS
do do

View File

@ -132,7 +132,7 @@ else
fi fi
# 1) active server # 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 case ${_NTP_PEER} in
\*127.127.1.0*) \*127.127.1.0*)
_MSG="NTP is synchronizing against its internal clock" _MSG="NTP is synchronizing against its internal clock"
@ -152,7 +152,7 @@ log_hc "$0" ${_STC} "${_MSG}"
# 2) offset value # 2) offset value
if (( _STC == 0 )) if (( _STC == 0 ))
then 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 case ${_CURR_OFFSET} in
+([-0-9])*(.)*([0-9])) +([-0-9])*(.)*([0-9]))
# numeric, OK (negatives are OK too!) # numeric, OK (negatives are OK too!)