diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-17 14:07:34 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-17 14:07:34 +0000 |
commit | 2db2f402a3bb0c948667c1401b733014fe90a718 (patch) | |
tree | d389192fa3385893f2c4492a98db6ef4790efd32 /plugins | |
parent | 2b10c19323e2415433db55ac4bfa0604294fa43d (diff) | |
download | monitoring-plugins-2db2f402a3bb0c948667c1401b733014fe90a718.tar.gz |
mysql detection cleanup: fixes runtime linking, autodetection of main
locations, detection of lib64 and different layouts
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1327 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Makefile.am | 2 | ||||
-rw-r--r-- | plugins/check_mysql.c | 4 | ||||
-rw-r--r-- | plugins/check_mysql_query.c | 4 | ||||
-rw-r--r-- | plugins/t/check_mysql.t | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 7f9d7456..9a1f6d09 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -63,7 +63,9 @@ check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS) check_load_LDADD = $(BASEOBJS) popen.o check_mrtg_LDADD = $(BASEOBJS) check_mrtgtraf_LDADD = $(BASEOBJS) +check_mysql_CPPFLAGS = $(MYSQLINCLUDE) check_mysql_LDADD = $(NETLIBS) $(MYSQLLIBS) +check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE) check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS) check_nagios_LDADD = $(BASEOBJS) runcmd.o check_nt_LDADD = $(NETLIBS) diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 92ac7ff0..9d547ddd 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c @@ -25,8 +25,8 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; #include "utils.h" #include "netutils.h" -#include <mysql/mysql.h> -#include <mysql/errmsg.h> +#include <mysql.h> +#include <errmsg.h> char *db_user = NULL; char *db_host = NULL; diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c index 321af7aa..b542fb44 100644 --- a/plugins/check_mysql_query.c +++ b/plugins/check_mysql_query.c @@ -22,8 +22,8 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; #include "utils.h" #include "netutils.h" -#include <mysql/mysql.h> -#include <mysql/errmsg.h> +#include <mysql.h> +#include <errmsg.h> char *db_user = NULL; char *db_host = NULL; diff --git a/plugins/t/check_mysql.t b/plugins/t/check_mysql.t index 78413c6e..852926a7 100644 --- a/plugins/t/check_mysql.t +++ b/plugins/t/check_mysql.t @@ -48,7 +48,7 @@ SKIP: { $result = NPTest->testCmd("./check_mysql -H $mysqlserver $mysql_login_details"); cmp_ok( $result->return_code, '==', 0, "Login okay"); - $result = NPTest->testCmd("./check_mysql -H $mysqlserver -u dummy"); + $result = NPTest->testCmd("./check_mysql -H $mysqlserver -u dummy -pdummy"); cmp_ok( $result->return_code, '==', 2, "Login failure"); like( $result->output, $bad_login_output, "Expected login failure message"); |