diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-09-11 08:02:04 (GMT) |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-09-11 08:02:04 (GMT) |
commit | 4b94b86bb9ddc521e8c61d50f90093a4e7b9f246 (patch) | |
tree | 26772924b57dc929bf97980da6a4ccbfe986d140 /configure.in | |
parent | fee4763db44ef71dff247d97d28ec4f670acbed0 (diff) | |
download | monitoring-plugins-4b94b86bb9ddc521e8c61d50f90093a4e7b9f246.tar.gz |
last changes to configure broke check_swap on RHLinux. Restore /proc/meminfo check and make check_swap ifdefs safer
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@716 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/configure.in b/configure.in index 0fdd8f6..37baafa 100644 --- a/configure.in +++ b/configure.in | |||
@@ -1248,17 +1248,12 @@ fi | |||
1248 | dnl SWAP info required is amount allocated/available and amount free | 1248 | dnl SWAP info required is amount allocated/available and amount free |
1249 | dnl The plugin works through all the swap devices and adds up the total swap | 1249 | dnl The plugin works through all the swap devices and adds up the total swap |
1250 | dnl available. | 1250 | dnl available. |
1251 | AC_PATH_PROG(PATH_TO_SWAP,swap) | ||
1252 | AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo) | ||
1251 | 1253 | ||
1252 | dnl dunno why this does not work below - use hack (kbd) | 1254 | dnl dunno why this does not work below - use hack (kbd) |
1253 | dnl fine on linux, broken on solaris | 1255 | dnl fine on linux, broken on solaris |
1254 | dnl if /bin/test -e "/proc/meminfo" | 1256 | dnl if /bin/test -e "/proc/meminfo" |
1255 | |||
1256 | AC_PATH_PROG(PATH_TO_SWAP,swap) | ||
1257 | AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo) | ||
1258 | |||
1259 | if ( test -n "$PATH_TO_SWAP" || test -n "$PATH_TO_SWAPINFO" ) | ||
1260 | then | ||
1261 | |||
1262 | AC_MSG_CHECKING(for how to check memory) | 1257 | AC_MSG_CHECKING(for how to check memory) |
1263 | if [cat /proc/meminfo > /dev/null 2>&1] | 1258 | if [cat /proc/meminfo > /dev/null 2>&1] |
1264 | then | 1259 | then |
@@ -1266,8 +1261,12 @@ then | |||
1266 | AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo]) | 1261 | AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo]) |
1267 | AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo if name changes]) | 1262 | AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo if name changes]) |
1268 | EXTRAS="$EXTRAS check_swap" | 1263 | EXTRAS="$EXTRAS check_swap" |
1264 | fi | ||
1265 | |||
1266 | if ( test -n "$PATH_TO_SWAP" || test -n "$PATH_TO_SWAPINFO" ) | ||
1267 | then | ||
1269 | 1268 | ||
1270 | elif [$PATH_TO_SWAP -l 2>&1 >/dev/null] | 1269 | if [$PATH_TO_SWAP -l 2>&1 >/dev/null] |
1271 | then | 1270 | then |
1272 | ac_cv_have_swap=yes | 1271 | ac_cv_have_swap=yes |
1273 | ac_cv_swap_command="$PATH_TO_SWAP -l" | 1272 | ac_cv_swap_command="$PATH_TO_SWAP -l" |