diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2004-08-18 20:36:07 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2004-08-18 20:36:07 +0000 |
commit | 5d6b214dbc6a9a32ce9e0b0f20914b1fbac76755 (patch) | |
tree | 5af9182587142d6ee2050bd2772a7408ceb53b35 | |
parent | 0bd9615bd28719a1219300a3c040ad3aa6f3dea1 (diff) | |
download | monitoring-plugins-5d6b214dbc6a9a32ce9e0b0f20914b1fbac76755.tar.gz |
Support for check_swap on NetBSD/OpenBSD (Sean Finney)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@887 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | configure.in | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 28d159e7..e207d95b 100644 --- a/configure.in +++ b/configure.in | |||
@@ -1362,6 +1362,32 @@ fi | |||
1362 | dnl end if for PATH_TO_SWAPINFO | 1362 | dnl end if for PATH_TO_SWAPINFO |
1363 | fi | 1363 | fi |
1364 | 1364 | ||
1365 | AC_PATH_PROG(PATH_TO_SWAPCTL,swapctl,,[$PATH:/sbin]) | ||
1366 | if (test -n "$PATH_TO_SWAPCTL") | ||
1367 | then | ||
1368 | AC_MSG_CHECKING([for $PATH_TO_SWAPCTL format]) | ||
1369 | if [$PATH_TO_SWAPCTL -l 2>&1 >/dev/null] | ||
1370 | then | ||
1371 | ac_cv_have_swap=yes | ||
1372 | ac_cv_swap_command="$PATH_TO_SWAPCTL -l" | ||
1373 | if [$PATH_TO_SWAPCTL -l 2>/dev/null | \ | ||
1374 | egrep -i "^Device +1K-blocks +Used +Avail +Capacity +Priority" >/dev/null ] | ||
1375 | then | ||
1376 | ac_cv_swap_format=["%*s %llu %*d %llu %*d"] | ||
1377 | ac_cv_swap_conv=1024 | ||
1378 | AC_MSG_RESULT([using 1K BSD format swapctl]) | ||
1379 | |||
1380 | elif [$PATH_TO_SWAPCTL -l 2>/dev/null | \ | ||
1381 | egrep -i "^Device +512-blocks +Used +Avail +Capacity +Priority" >/dev/null ] | ||
1382 | then | ||
1383 | ac_cv_swap_format=["%*s %llu %*d %llu %*d"] | ||
1384 | ac_cv_swap_conv=2048 | ||
1385 | AC_MSG_RESULT([using 512 byte BSD format swapctl]) | ||
1386 | fi | ||
1387 | fi | ||
1388 | dnl end if for PATH_TO_SWAPCTL | ||
1389 | fi | ||
1390 | |||
1365 | if test "x$ac_cv_have_swap" != "x" | 1391 | if test "x$ac_cv_have_swap" != "x" |
1366 | then | 1392 | then |
1367 | AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found]) | 1393 | AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found]) |