blob: e457f451dd4c45f86b33a76bc97867a1e83b8017 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
## Process this file with automake to produce Makefile.in
SUFFIXES = .pl .pm .sh
VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
libexec_SCRIPTS=check_mysql_health
MY_MODULES=
EXTRA_MODULES=\
Nagios/DBD/MySQL/Server/Instance/Innodb.pm \
Nagios/DBD/MySQL/Server/Instance/Myisam.pm \
Nagios/DBD/MySQL/Server/Instance/Replication.pm \
Nagios/DBD/MySQL/Server/Instance.pm \
Nagios/DBD/MySQL/Server.pm \
Nagios/DBD/MySQL/Cluster.pm \
Nagios/Extraopts.pm
EXTRA_DIST=check_mysql_health.pl $(EXTRA_MODULES)
CLEANFILES=$(libexec_SCRIPTS)
AM_INSTALL_PROGRAM_FLAGS= _æ_ INSTALL_OPTS _æ_
.pm :
$(AWK) -f ./subst $< > $ _æ_
chmod +x $ _æ_
.pl :
$(AWK) -f ./subst $< > $ _æ_
chmod +x $ _æ_
.sh :
$(AWK) -f ./subst $< > $ _æ_
chmod +x $ _æ_
$(libexec_SCRIPTS) : $(EXTRA_DIST)
$(ECHO) "#! #PERL# -w" | $(AWK) -f ./subst > $ _æ_
$(ECHO) "# nagios: -epn" >> $ _æ_
$(ECHO) >> $ _æ_
$(ECHO) "my %ERRORS=( OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 );" >> $ _æ_
$(ECHO) "my %ERRORCODES=( 0 => 'OK', 1 => 'WARNING', 2 => 'CRITICAL', 3 => 'UNKNOWN' );" >> $ _æ_
for m in ${EXTRA_MODULES}; do \
$(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "my %ERROR" >> $ _æ_ ; \
done
if [ -d "${MYMODULES_DIR}" ]; then \
for m in ${MYMODULES_DIR}/CheckMySQLHealthExt*.pm; do \
if [ -f $$m ]; then \
$(ECHO) found $$m; \
$(SED) -e 's/^1;//g' < $$m | $(AWK) -f ./subst | $(GREP) -v "my %ERROR" >> $ _æ_ ; \
fi \
done \
fi
$(CAT) check_mysql_health.pl | $(GREP) -v "^use Nagios" | $(GREP) -v "^my %ERROR" | $(AWK) -f ./subst >> $ _æ_
chmod +x $ _æ_
|