summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2004-08-18 20:36:07 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2004-08-18 20:36:07 +0000
commit5d6b214dbc6a9a32ce9e0b0f20914b1fbac76755 (patch)
tree5af9182587142d6ee2050bd2772a7408ceb53b35
parent0bd9615bd28719a1219300a3c040ad3aa6f3dea1 (diff)
downloadmonitoring-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.in26
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
1362dnl end if for PATH_TO_SWAPINFO 1362dnl end if for PATH_TO_SWAPINFO
1363fi 1363fi
1364 1364
1365AC_PATH_PROG(PATH_TO_SWAPCTL,swapctl,,[$PATH:/sbin])
1366if (test -n "$PATH_TO_SWAPCTL")
1367then
1368AC_MSG_CHECKING([for $PATH_TO_SWAPCTL format])
1369if [$PATH_TO_SWAPCTL -l 2>&1 >/dev/null]
1370then
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
1387fi
1388dnl end if for PATH_TO_SWAPCTL
1389fi
1390
1365if test "x$ac_cv_have_swap" != "x" 1391if test "x$ac_cv_have_swap" != "x"
1366then 1392then
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])